[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Need help finding invalid references to target IDs
Hi Dave, Here's one approach: At the beginning of your XSL, make a key for @id attributes in the document. Then for each @refid in the document, check if there is a matched key. If it doesn't report an error. (Schematron is one way you could check this quickly... But if you want a lighter weight XSLT, it should be simple to do.) Darcy On Thu, Jun 26, 2008 at 2:10 PM, Hintz, David L <david.hintz@xxxxxxxxxxx> wrote: > Hi, > > This is probably a newbie question, although I've hacked a lot of XSLT > for about a year. This problem has me stumped, however. > > Our schema has numerous elements with "id" attributes (target IDs) and > several with "refID" attributes (reference IDs). Unfortunately, these > are not defined as ID and IDREF respectively or I wouldn't be having > this issue. I need to compare all of the "refID" attributes in a > document against all of the "id" attributes and generate a report > showing the "refID" attributes that do not have a valid target. I know > this is probably only a few lines in XSLT, but I'm not sure where to > even start to do this test. > > Can anyone get me started? > > Dave Hintz
|
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
|