Dear All,
I am trying to use ID/IDREF to create what amounts to a name authority
file within my XML. The goal is to allow one section of the XML to
contain commonly used data (such as names of people), and allow the
other sections to access that information, and the information
contained within, via the ID ref. I'm including an example of what
I'm trying to do after my signature.
I'm using XSLT 1.0, though a 2.0 solution would be welcome as well.
Apologies: I am definitely a novice, so this may be really simple. I
spent a fair amount of time attempting to find discussion of this on
the archives of the list, but never really knew what terms would make
a good search string, and so could easily have missed the discussion,
if it exists. Thanks in advance for any help!
Cheers,
Eric
****
Sample XML:
<foo ID="ack">
<testa>blah</testa>
<testb>blah2</testb>
</foo>
<foo ID="grr">
<testa>argh</testa>
<testb>argh2</testb>
</foo>
<bar zok="ack" name=>
<testc>blah3</testc>
<testd>blah4</testd>
</bar>
The DTD
<!ELEMENT test (foo*, bar*) >
<!ELEMENT foo (testa, testb) >
<!ATTLIST foo
ID ID #REQUIRED>
<!ELEMENT bar (testc, testd) >
<!ATTLIST bar
zok IDREFS #REQUIRED>
Desired output from <xsl:template match="bar">:
blah
blah2
blah3
blah4
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--