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

RE: Find node-set from string

Subject: RE: Find node-set from string
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 29 Nov 2006 14:20:49 -0000
RE:  Find node-set from string
> My purpose is to convert between different XSD/XML formats by 
> means of a mapping file generated from a database (i.e. a 
> reference data library), hence the data from the input file 
> shall be transformed to corresponding elements in the output 
> file according to defined criterias. The mapping file itself 
> can be constructed as needed from the db output.
> So far it seems to be easiest to store the "full path" 
> (A/B/C) of the data elements in db, and map between them like:
>   <mappings>
>     <map>
>       <format_1>message/header/from</format_1>
>       <format_2>notification/originator</format_2>
>     </map>

How are you planning to handle namespaces?

I can see how you would use this to rename elements, if format_2 were a
simple element name. I can't see how you intend to use the full path in
format_2.

> 
> Q2: Are there better strategies / methods for solving this 
> kind of problem?
> (Not limited to what's sketched above.)
> 

I think that for this kind of problem, generating a stylesheet might be a
better approach than saxon:evaluate. It ends up being more extensible if you
want to add features like translating data values or grouping adjacent
values.

Come to my talk at XML 2006 next week on meta-stylesheets...

Michael Kay
http://www.saxonica.com/

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.