Quantcast
Channel: Adobe Community : Popular Discussions - FrameMaker Structured
Viewing all articles
Browse latest Browse all 66580

Error if an element name is declared more than once in XSD. But e.g. Dot.Net accepts this

$
0
0

Frame Maker 11 reports an error if an element name is declared more than once in XSD. However Dot.NET 4.0 validation with the same XSD is OK with such model and validates the different modeled elements with the same name (e.g. fett) correctly. We need the "double declaration of the same element" feature in Frame Maker 11 in a big migration project. We migrate  SGML data to XML. How can we solve this? 

 

Hint: we explicitly want to prohibit an endless recursive nesting of elements!

 

Sample XSD:

<xs:schema xmlns="http://tempuri.org/test-rekursion" xmlns:tr="http://tempuri.org/test-rekursion" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://tempuri.org/test-rekursion" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:group name="inlineBase"> <xs:choice> <xs:element name="sup" type="xs:string" /> <xs:element name="sub" type="xs:string" /> <xs:element name="keyword" type="xs:string" /> <xs:element name="inline-graphics" type="xs:string" /> </xs:choice> </xs:group> <xs:element name="paragraph"> <xs:complexType mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="tr:inlineBase" /> <xs:element name="bold"> <xs:complexType mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="tr:inlineBase" /> <xs:element name="italic"> <xs:complexType mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="tr:inlineBase" /> </xs:choice> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <xs:element name="italic"> <xs:complexType mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="tr:inlineBase" /> <xs:element name="bold"> <xs:complexType mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="tr:inlineBase" /> </xs:choice> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:choice> <xs:attribute name="autor" type="xs:string" /> </xs:complexType> </xs:element> </xs:schema>

 

Sample XML:

<paragraph xmlns="http://tempuri.org/test-rekursion" xsi:schemaLocation="http://tempuri.org/test-rekursion test-recursion2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > Lorem ipsum <bold>dolor <italic>sit amet<sup>hoch 2</sup>, consetetur </italic>sadipscing elitr, sed diam nonumy eirmod</bold> tempor invidunt ut labore et <italic>dolore <bold>magna aliquyam<sup>hoch 3</sup> erat</bold>, sed diam voluptua</italic>. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </paragraph>



Opening the XML in Frame Maker 11 results in following error:

XML Read Report Log Source Document: C:\Work\DOCS\120820-Base-Umstrukturierung\Bold-Italic-Test-2.xml XML Parser Messages (Document Prolog) Error at file C:\Users\t25681a\AppData\Local\Temp\FMTCCD7.tmp, line 18, char 17, Message: Element 'italic' has already been declared Error at line 19, char 15, Message: Element 'bold' has already been declared

 

Thanks a lot for any suggestions

Miro


Viewing all articles
Browse latest Browse all 66580

Trending Articles