How to write an XSLT to transform following XML in the following HTML?

Posted by Taz on Stack Overflow See other posts from Stack Overflow or by Taz
Published on 2010-04-02T05:17:42Z Indexed on 2010/04/02 5:23 UTC
Read the original article Hit count: 387

Filed under:
|
|
|

Hi I have an XML as below
<result>
<binding name="PropertyURI"> <uri>http://dbpedia.org/ontology/motto</uri> </binding> <binding name="Property"> <literal xml:lang="en">motto</literal> </binding> <binding name="ValueURI"> <uri>http://dbpedia.org/ontology/motto</uri> </binding> <binding name="Value"> <literal>Ittehad, Tanzim, Yaqeen-e-Muhkam(Urdu)</literal> </binding> </result>

I want to transform it like
<a href=PropertyURI>Property</a> <a href=ValueURI>Value</a>
Problem is that number of binding tags can different. Sometimes we may have only URIs or ony Values. How can I know in XSLT that if binding with @name=PropertyURI is available. If yes then what is the name of next binding @name attribute?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xslt