|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Name authority and ID/IDREF
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






