Copy link to clipboard
Copied
I'm investigating utilizing structured FrameMaker with an existing schema which is causing issues due to what appears to be limitations of DTDs vs schemas.
The schema that I'm using has a number of cases where it uses elements with the same name others at different levels of hierarchy. For example it has the following to 'description' elements, one as a common type defined at the top level of the schema and another as a sub-element within another element in the schema:
<xs:element name="imageType" minOccurs="0" maxOccurs="unbounded">
...
<xs:element name="description" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>String for describing this file to users</xs:documentation>
</xs:annotation>
</xs:element>
...
</xs:element>
<xs:element name="description" type="ipxact:stringExpression" minOccurs="1">
<xs:annotation>
<xs:documentation>Full description string, typically for documentation</xs:documentation>
</xs:annotation>
</xs:element>
When I attempt to open an XML file which uses this schema, I get a lot of errors similar to the following due to these duplicate elements:
'Error at line 508, char 22, Message: Element 'description' has already been declared'
If I import the schema and convert it to a DTD, there are in fact two description elements defined, with different attributes. From my research it appears that this is something supported in schemas that has no equivalent in DTDs. If the two elements were identical this wouldn't be an issue as I could remove the duplicate copy in the DTD, but since they can have different types or constraints it is causing issues for properly validating the XML.
It looks like even if you don't specify a DTD for a structured application Frame will internally convert the file's schema into a DTD anyway when opening the file. Unfortunately this is an industry standard schema and I don't have any control over it, so I can't tweak the schema to change any of these duplicate names.
Is there any way to properly handle such a schema in Structured Framemaker?
Copy link to clipboard
Copied
Brant,
I would use slightly different schemas with FM and elsewhere. In particular, I would:
--Lynne