Wendell, The XML parser does not process XIncludes. As the XInclude spec says:
"Processing of external entities (as with the rest of DTDs) occurs at parse time. XInclude operates on information sets and thus is orthogonal to parsing." ID/IDREF validation occurs at parse time, and therefore cannot take account of XIncluded material. The solutions, I would suggest, is not to abandon Xinclude, but to redefine the ID/IDREF attributes so that they are no longer ID/IDREF types, but a suitable string type, and then implement validation at the application level rather than the relying on the parser to do the validation. Parser level ID/IDREF validation is too limited to be considered a general purpose validation mechanism for references in any case. Mark > -----Original Message----- > From: oxygen-user-boun...@oxygenxml.com > [mailto:oxygen-user-boun...@oxygenxml.com] On Behalf Of Wendell Piez > Sent: July 22, 2010 12:34 PM > To: Oxygen User > Subject: [oXygen-user] XInclude and ID/IDREF validation > > Hi, > > This is a classic problem, probably with a simple solution > (or workaround), but I can't locate it. > > What can I do to get ID/IDREF to work across file boundaries > when using XInclude to construct a document with several modules? > > I have tried setting up a Validation Scenario naming the > master document, and when subordinate modules are validated, > this appears to be working, inasmuch as I get validation > errors for all modules (including the master) when I validate > any of them. But IDREF values in attributes fail validation > when their corresponding ID values are in other modules. > > I am figuring that this is either a setting I have failed to > make correctly (where should I be looking?), or maybe a > limitation of some kind, such as that when XInclude is > involved, only attributes named @xml:id are respected (this > is a wild guess), not just any attribute declared as type ID > in the DTD (which is what I have). > > Or maybe I will have to consider going back to external > parsed entities? I am very reluctant to do this, since the > subordinate documents need their own DOCTYPE declarations to > pick up entity declarations of their own, and of course these > aren't legal in external parsed entities. > > I know this is/was a bugaboo in the specification of > XInclude, but was figuring that in the time since its > inception, solutions have emerged.... > > Thanks for any tips, as always. > > Cheers, > Wendell > > > > ====================================================================== > Wendell Piez mailto:wap...@mulberrytech.com > Mulberry Technologies, Inc. http://www.mulberrytech.com > 17 West Jefferson Street Direct Phone: 301/315-9635 > Suite 207 Phone: 301/315-9631 > Rockville, MD 20850 Fax: 301/315-8285 > ---------------------------------------------------------------------- > Mulberry Technologies: A Consultancy Specializing in SGML > and XML > ====================================================================== > > _______________________________________________ > oXygen-user mailing list > oXygen-user@oxygenxml.com > http://www.oxygenxml.com/mailman/listinfo/oxygen-user > > _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user