XSLT Query problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tranvirus

    #1

    XSLT Query problems

    Hi,

    I have these two XML documents that I'm trying to merge, they are
    identical except by the content they have is in different languages so
    I want to generate a third document with a new format including both
    languages. My problem is that they both have an attribute that's a
    unique identifier in both documents have the same values in the same
    positions of the three. I want to parse one file and then through the
    document() function and recover the value of an specific
    node/attribute by using the unique identifier attribute, to recover
    the value of an attribute for the merged document my query looks like
    this:

    <xsl:value-of select="documen t($secondarydoc ument)/node1[@attrib1=value1]@attrib2"
    />

    There's something wrong with this query, my xslt engine complains
    of @attrib2 it's in the wrong place, how do I recover the value of an
    attribute when I already recovered the value of another attribute in
    the query? I hope you can help me with this.

    Thanks!

    Claudio.
  • David Carlisle

    #2
    Re: XSLT Query problems


    you are missing a / before the @

    <xsl:value-of
    select="documen t($secondarydoc ument)/node1[@attrib1=value1]/@attrib2"/>
    ^

    David

    Comment

    Working...