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

XML IDREFs

Subject: XML IDREFs
From: c p <bugs75il@xxxxxxxxx>
Date: Fri, 4 Mar 2005 09:33:16 -0800 (PST)
xml idrefs
This is more of an XML question.  I am going to make
this simple and talk with specific example:

I have 2 XML files one.xml and two.xml:

one.xml
------------------------------------------------
<root>
  <myelement id="coke">content for coke</myelement>
</root>
------------------------------------------------


two.xml
------------------------------------------------
<root>
  <text>
    Coke vs Sprite ... ... ... ...
  </text>
  <intxref refid="coke" label="Coke"/>

  <intxref refid="sprite" label="Sprite"/>
  <myelement id="Sprite">content for
sprite</myelement>

</root>
------------------------------------------------

I am validating both xml against a dtd and in my dtd
the intxref element is defined like this:
------------------------------------------------
<!ELEMENT intxref ANY>
<!ATTLIST intxref
      refid IDREF #IMPLIED
      label CDATA #IMPLIED
      >
------------------------------------------------

When I validate the two.xml file against the DTD, it
errors out giving following message: "A reference to
undeclared ID 'coke' has been found."  Note that if I
comment out the coke reference and leave just the
Sprite one in, then it works fine as the Sprite
reference is local within the file.  How would I do a
cross-reference with different xml files?  Is there a
way?  Is it even possible?

Thanks
C

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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-2013 All Rights Reserved.