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

XML transformation based on parameters

Subject: XML transformation based on parameters
From: Emiliano Pecis <emiliano.pecis@xxxxxxxxx>
Date: Tue, 14 Apr 2009 15:14:20 +0200
 XML transformation based on parameters
Hi All,

I'm using latest version of Stylus Studio, to develop a XSLT (based on
Saxon 9.0.1.5 processor) to do the following simple (should be)
transformation.

>From XML:

<GetCatalog>
   <ListOfCatalog>
        <Catalog>
           <Id> <param name="same/new">foo</param> </Id>
        </Catalog>
   </ListOfCatalog>
</GetCatalog>

The destination must depends on "name" attribute of param element. If
name="same" the following XML must be returned:

<GetCatalog>
   <ListOfCatalog>
        <Catalog>
           <Id> foo </Id>
        </Catalog>
   </ListOfCatalog>
</GetCatalog>

Otherwise:

<GetCatalog>
   <ListOfCatalog>
        <Catalog>
           <Id> newvalue </Id>
        </Catalog>
   </ListOfCatalog>
</GetCatalog>

In both cases <param> element has to be removed.

Now, I have two issues. First of all the management of this
"parameters".Secondly, every xml elements (GetCatalog, ListOfCatalog,
etc etc) could change: only tag "param" will be the same.

Thanks a lot in advance,
emiliano

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.