- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在创建一个平面文件模式来实现一种名为 Tradacoms 的旧英国 EDI 格式。我已经复制了我正在处理的模式部分所需的内容,并且通常运行良好。但是,由于架构中有很多可选项目,我需要将解析器优化更改为复杂性。
为了轻松解释问题,我将问题重现为一个更小的模式(实际上与 Tradacom 完全无关)。
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Bidvest.Integration.Supplier.Schemas.TestSchema" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Bidvest.Integration.Supplier.Schemas.TestSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo standard="Flat File" root_reference="Root" default_pad_char=" " pad_char_type="char" count_positions_by_byte="false" parser_optimization="complexity" lookahead_depth="0" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" early_terminate_optional_fields="false" allow_message_breakup_of_infix_root="false" compile_parse_tables="false" />
<schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Root">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_order="infix" child_delimiter_type="char" child_delimiter="+" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Name" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Address">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited" preserve_delimiter_for_empty_data="false" suppress_trailing_delimiters="false" child_order="infix" child_delimiter_type="char" child_delimiter=":" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element minOccurs="0" name="Line1" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="1" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Line2" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="2" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Line3" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="3" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Line4" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="4" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Line5" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="5" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="PostCode" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo justification="left" sequence_number="6" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="Country" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="7" justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
该架构包含一个名称元素和一个地址记录,该记录本身具有许多可选元素。
如果我使用下面的测试文件验证实例(右键单击架构等)
DAve+Line1:Line2:Line3:Line4:Line5:PostCode:Country
然后我按预期得到下面的输出
<Root xmlns="http://Bidvest.Integration.Supplier.Schemas.TestSchema">
<Name xmlns="">DAve</Name>
<Address xmlns="">
<Line1>Line1</Line1>
<Line2>Line2</Line2>
<Line3>Line3</Line3>
<Line4>Line4</Line4>
<Line5>Line5</Line5>
<PostCode>PostCode</PostCode>
<Country>Country</Country>
</Address>
</Root>
如果我使用如下非常简单的消息验证实例
DAve+Line1
然后我得到以下输出
<Root xmlns="http://Bidvest.Integration.Supplier.Schemas.TestSchema">
<Name xmlns="">DAve</Name>
<Address xmlns="">
<Line4>Line1</Line4>
</Address>
</Root>
您可以看到 Line1 已放置在 Line4 元素中。由于上面的示例消息将文本“Line1”作为分隔符之前的第一个值,因此我预计上面的 XML 是 Line1。
这里发生了一些非常奇怪的事情。有人可以帮忙吗?我在 BizTalk 2013 (CU3) 和 BizTalk 2013 R2 中遇到此问题。
最佳答案
是的,如果记录开头没有必填字段,平面文件反汇编程序可能会变得非常困惑。您已将所有地址元素设置为可选,然后可能会得到非常奇怪的结果。我发现您应该始终至少有一个必填字段作为第一个字段,并且永远不应该在可选字段之后有一个必填字段。
如果您删除 line1
上的 minOccurs = 0
,它会正常工作,并且您会得到以下结果。
<Root xmlns="http://Bidvest.Integration.Supplier.Schemas.TestSchema">
<Name xmlns="">DAve</Name>
<Address xmlns="">
<Line1>Line1</Line1>
</Address>
</Root>
它甚至可以处理以下输入
DAve+
得到以下输出
<Root xmlns="http://Bidvest.Integration.Supplier.Schemas.TestSchema">
<Name xmlns="">DAve</Name>
<Address xmlns="">
<Line1/>
</Address>
</Root>
或者
DAve
输出
<Root xmlns="http://Bidvest.Integration.Supplier.Schemas.TestSchema">
<Name xmlns="">DAve</Name>
</Root>
关于BizTalk 平面文件复杂性解析问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34153403/
我正在尝试将游戏中的 GPS map 系统复制到网络中。基本上游戏中有 12 张 map ,每张 map 都有不同的安全区域,你可以在其中扭曲你的 Angular 色或走动,但我一路上遇到了一些问题。
给定一个根目录,逐行读取 rootDirectory 或子目录中的所有文件,并对每个文件中的所有数字求和。每个文件的每一行都有一个编号。所以我只需要读取所有文件并对所有数字求和并返回。我想出了下面的代
我使用的是 MySQL 5.5,有两个表 T1(ID, NAME) 和 T2(ID, MARKS),下面是表中的数据。 T1的数据 ID NAME 1 A 2 B 3 C T2的数据 ID MA
我必须确定以下函数的时间复杂度(大 O): void BET::makeEmpty(BinaryNode* &n) { if(n != NULL) { makeEmpt
我基本上了解如何计算函数的复杂度。这同样适用于确定数学函数的增长顺序。 [我可能不像我想的那样理解它,这就是为什么我可能会问这个。] 例如: an^3 + bn^2 + cn + d 可以用大 O 表
我有一个家庭作业问题,一段时间以来我一直在努力解决,但我终其一生都无法解决。 我有一张尺寸为 X*Y 的纸和一组尺寸较小的图案,以及与之相关的价格值。我可以水平或垂直切割板材,我必须找到优化的切割模式
我写了这个字符串所有排列的解决方案。我对这个解决方案的时间和空间复杂性有疑问。我假设时间复杂度为 O(n³),因为嵌套循环和递归以及空间复杂度为 O(n),因为递归。 我的假设是否正确?如果可以,有没
刚遇到这个问题: 子集求和问题:求给定数组中两对数字的总和等于给定数字的个数 例如:给定总和为 9,数组为 { 0, 1, 2, 7, 13 } => O/P 为 1 对(2 和 7) 似乎这可以在
鉴于我有一个包含一组单词的文件: 1) 如果我选择一个哈希表来存储单词 -> 计数,查找特定单词出现的时间复杂度是多少? 2) 我怎样才能按字母顺序返回这些单词? 如果我选择哈希表,我知道 1) 的时
我很难理解大 O 时间复杂度。 Big O 的正式定义: f(n) = O(g(n)) means there are positive constants c and k, such that 0
有人知道 ECMAScript5 的 Object.keys() 在常见实现中的时间复杂度吗? n 个键的时间复杂度是 O(n) 吗?假设采用哈希实现,时间与哈希表的大小成正比吗? 我正在寻找语言实现
我需要知道,就复杂性而言,什么更好。要么为每个按钮从 xml 中标识一个单独的 onClick 方法,如下所示: android:onClick:"clickHandler" 和java代码: pub
无论如何我都不是 Javascript 的新手;也就是说,我对 bind 的作用及其行为方式有了基本的了解。但是,我遇到了一个我对结果有点不确定的用例。让我详细说明一个示例设置: 示例设置 首先,我有
这个问题在这里已经有了答案: Python list.clear() time and space complexity? (4 个答案) 关闭 1 年前。 Python 3 方法 list.cle
我创建的这个计算两个数组的交集是线性的方法的复杂度(在良好、平均、最差的情况下)? O(n) public void getInt(int[] a,int[] b){ int i=0; int
假设我已经使用 PriorityQueue 实现了 dijkstras,因此在未访问的节点中添加和删除需要 O(log n)。 PQ 最多包含 E 个节点,因此清空它我们得到 O(E)。当 PQ 不为
我能得到一些帮助来理解如何解决这个教程问题吗?我仍然不明白教授的解释。我不确定如何计算第三个/最内层循环的大 0。她解释说,该算法的答案是 O(n^2),并且第二个和第三个循环必须被视为具有 O(n)
有人可以告诉我这个过程在 for 迭代中的时间复杂度吗?这段代码是FloydWarshall算法的“重构路径”部分。prev[n][n]是最短路径中源节点和目的节点之间的节点矩阵。printAllSP
运行时间、复杂性、编译时间和执行时间有什么区别? 运行时间与时间复杂度有冲突,执行时间和执行时间有什么区别? 最佳答案 您真正需要的是如何将大O时间复杂度转换为运行时。这不像一开始看起来那么容易。 因
我对算法复杂度的计算很困惑。对于一项任务,我们被赋予以下功能并要求找到它的复杂性。 int selectkth(int a[], int k, int n) { int i, j, mini,
我是一名优秀的程序员,十分优秀!