Menu

id() function and schemas

Help
Anonymous
2002-01-29
2012-10-08
  • Anonymous

    Anonymous - 2002-01-29

    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

     
    • Michael Kay

      Michael Kay - 2002-01-29

      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