<xref> cross-ref element with multiple IDREFs


hello,

 

i building in fm 12 structured app army's mil-std-2361 xml. <xref> cross-reference element has multiple idref attributes, each specific associated element. example @figid <figure>.

 

if read/write rules issue, can't figure out is. error if more 1 property cross-reference id used.

 

here dtd <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

stan,

   fm not support model directly, can use simple xslt transformations go , forth between variant model used in fm , 1 defined in dtd.

 

  in particular, fm cross-reference element can have number of attributes, including multiple idref or idrefs attributes. text displayed cross-reference element determined element identified first such attribute declared in edd. if attribute declared idrefs, fm uses first value in attribute determine displayed text. in case, thus, fm use value of tasked. second attribute can used specify cross-reference format used in fm. these conventions select @ least 2 possible variations used in fm:

 

  1. instead of single xref element, define multiple cross-reference elements such taskxref, figurexref, , forth. these various elements have idref attribute generic name such id, or have appropriate name attributes defined in xml. in either case, can use read/write rules rename element (and idref attribute, if necessary) when save fm document xml. when open xml document in fm, use xslt preprocess finds referenced element , determines type (element name) determine element tag used in fm.
  2. an alternative use xref element tag in both xml , fm, generic idref attribute used in cases. in addition, define new attribute use in temporary xml files specifies name of fm cross-reference format used or used. when saving fm document xml, use xslt postprocess. fm therefore write temporary xml file input postprocess. appropriate r/w rules,  temporary file contain both idref , format attributes. postprocess determine name of idref attribute , possibly values of 1 or more of cdata attributes these attributes. open xml document, use xslt preprocess create temporary file sets idref , format attributes.

 

the catch here , reason ("probably") in opening paragraph above, that  xslt coding simple if know cross-reference formats used. if want more flexible tool not based on knowledge of formats used in fm, need use fdk scott prentice suggested on list.

 

      --lynne



More discussions in FrameMaker Structured


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop