XSLT Query problems

T

tranvirus

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="document($secondarydocument)/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.
 
D

David Carlisle

you are missing a / before the @

<xsl:value-of
select="document($secondarydocument)/node1[@attrib1=value1]/@attrib2"/>
^

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top