File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XSLT Processing using XPath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSLT Processing using XPath" Watch "XSLT Processing using XPath" New topic

XSLT Processing using XPath

Guruprasad Kateel

Joined: Jul 10, 2003
Posts: 16
I am trying to transform one xml document to another xml depending on particular values using XSL transformation( I am using XALAN transformer).
My XML Doc:

Now i need to get a RESPONSE node along with the child nodes depending on the values of the attributes 'ID' and 'KEY' of SEGMENTQUERY node.
My XSL File:

In the above xsl, if i am just checking the id parameter and its working fine, But i am not able to add check condition for 'KEY' parameter.
Please help me.
Thanks in advance,
[code tag added and smiles disabled to improve readability - M.I.]
[ July 10, 2003: Message edited by: Mapraputa Is ]
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
<xsl:copy-of select="ARCXML/SEGMENTQUERY[@ID=$id and @KEY=$key]/*" />
seems working...

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
I agree. Here's the link:
subject: XSLT Processing using XPath