Copy link to clipboard
Copied
Hello,
I am building in a FM 12 structured app for the Army's MIL-STD-2361 XML. The <xref> cross-reference element has multiple IDREF attributes, each specific to its associated element. For example @figid is for <figure>.
If this is a read/write rules issue, I can't figure out what it is. I get an error if more than one property cross-reference id is used.
Here is the DTD for <xref>
<!ELEMENT xref EMPTY>
<!ATTLIST xref
taskid IDREF #IMPLIED
wpid IDREF #IMPLIED
stepstart IDREF #IMPLIED
stepend IDREF #IMPLIED
figid IDREF #IMPLIED
itemno CDATA #IMPLIED
itemid IDREF #IMPLIED
callout CDATA #IMPLIED
tableid IDREF #IMPLIED
tslocid IDREF #IMPLIED
pagelocid IDREF #IMPLIED
pretext CDATA #IMPLIED
posttext CDATA #IMPLIED
termdefid IDREF #IMPLIED
applicable IDREFS #IMPLIED
Thanks,
Stan
Copy link to clipboard
Copied
Stan,
FM does not support this model directly, but you can probably use simple XSLT transformations to go back and forth between a variant model used in FM and the one defined in the DTD.
In particular, a FM cross-reference element can have any number of attributes, including multiple IDREF or IDREFS attributes. The text displayed for the cross-reference element is determined by the element identified by the first such attribute declared in the EDD. If the attribute is declared IDREFS, FM uses the first value in the attribute to determine the displayed text. In your case, thus, FM will always use the value of tasked. A second attribute can be used to specify the cross-reference format to be used in FM. These conventions select at least two possible variations that could be used in FM:
The catch here and the reason for ("probably") in the opening paragraph above, is that the XSLT coding is simple if you know what cross-reference formats will be used. If you want a more flexible tool that is not based on knowledge of the formats used in FM, then you will probably need to use the FDK as Scott Prentice suggested on another list.
--Lynne