[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Name authority and ID/IDREF

Subject: Name authority and ID/IDREF
From: Eric <kiteeatingtree@xxxxxxxxxxxxx>
Date: Mon, 28 Sep 2009 22:02:16 -0600
 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.