[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Replace values based on external files

Subject: Replace values based on external files
From: "Robert Soesemann" <rsoesemann@xxxxxxxxxxx>
Date: Fri, 14 Jan 2005 10:28:21 +0100
replace values in xml
Hello,

I need to implement a XSL that will replace text values in file1.xml
based on replacement information in file2.xml.

file2.xml provides an XPath that points to an attribute / element value
and a replacement value. The XML has the form of:

<mapping>
    <!-- should replace @attribute1 value that are 'foo' of all element1
elements in file1.xml with 'bar'-->
    <replace>
        <xpath>//element1/@attribute1[.='foo']</xpath>
        <with>bar</with>
    </replace>
    <replace>
        ...                    <!-- other replacement operations -->
    </replace>
    ...
</mapping>

Is there an easy way to dynamically generate replacement instructions in
my XSL. I thought of extracting replacement information from file2.xml
with the document function.


Any help is much welcome.

Robert

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.