xsl-list
[Top] [All Lists]

RE: [xsl] Need help finding invalid references to target IDs

2008-06-26 13:15:52

Our schema has numerous elements with "id" attributes (target 
IDs) 

<xsl:key name="kid" match="*[(_at_)id]" use="@id"/>

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. 

<xsl:for-each select="//*[(_at_)refID][not(key('kid', @refID)])">
  ...


Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>