[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|