I'm trying to use the id() function but I can
not make it work. For the transformation process the information about id comes from the document definition. I'm using Schemas, not DTDs. Might that be the problem?
I'm using XML Spy, Saxon, MSXML
Thanks,
Marcel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not clear to me what XML parser you're using but unless it's notifying the ID attribute to Saxon as being an ID, Saxon won't recognize it for use in the id() function. It's safest to assume that XSLT 1.0 processors are not schema-aware.
Rather than try to force your ID attributes to be recognized as id's, I would be inclined to defined them as keys using xsl:key.
Mike Kay
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use the id() function but I can
not make it work. For the transformation process the information about id comes from the document definition. I'm using Schemas, not DTDs. Might that be the problem?
I'm using XML Spy, Saxon, MSXML
Thanks,
Marcel
It's not clear to me what XML parser you're using but unless it's notifying the ID attribute to Saxon as being an ID, Saxon won't recognize it for use in the id() function. It's safest to assume that XSLT 1.0 processors are not schema-aware.
Rather than try to force your ID attributes to be recognized as id's, I would be inclined to defined them as keys using xsl:key.
Mike Kay