Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


How to use XSLT to transform XML according to the data in another XML

From: ai2003lian@-----.---
To: NULL
Date: 2/2/2005 8:59:00 AM
I have a XML containing more information than required. And I want to
transform it to a XML with less information according to the
requirement data in another XML. How could I accomplish this using
XSLT?

Here're the XML files:

source.xml :

<AllFields>
<field name="f1", type="N">value1</field>
<field name="f2", type="N">value2</field>
<field name="f3", type="N">value3</field>
<field name="f4", type="N">value4</field>

...
</AllFields>

requirement.xml :

<requiredFields>
<field>f1</field>
<field>f3</field>
</requiredFields>

result.xml :

<AllFields>
<field name="f1", type="N">value1</field>
<field name="f3", type="N">value3</field>
</AllFields>

Thanks in advance!



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent