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

Confusion with generated xsl

Subject: Confusion with generated xsl
From: "ian.proudfoot@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 May 2018 13:53:00 -0000
 Confusion with generated xsl
Hello XSL community,

I have been creating a content conversion system using XSLT 3.0 with Saxon
PE 9.8.0.8 in Oxygen 20.0. The production version is being tested with Saxon
PE 9.8.0.11J.
The workflow is to pre-process and simplify the source XML into a flatter
and more consistent intermediate format. A second transform then uses the
input from a mapping file to generate an XSLT file that is subsequently used
to transform the intermediate output into the required final output. 

I'm satisfied with the way almost everything works so far. However creating
the stylesheet for generating xsl is rather more complex than expected. I
don't know if there is a normal way to do this, but I manually created a
sample XSL file that performed a typical transformation that was to be done
by the generated version. I then set-about creating that dynamically via a
transform, of course using namespace-alias to generate all of the required
templates, functions, variables and so-on. So here's where I'm getting lost.
How can I generate an attribute value template without the {} becoming
active and forcing the XPath to be evaluated before it's ready? In some
cases I've created a function that wraps the target XPath in curly brackets
but for some cases that seems no to work. Generating element names this was
always seems to fail.

This is the typical output that I need from the generated stylesheet.
(Nothing special about my function, it just assembles the element name the
way I need depending on three arguments.)
<xsl:element name="{itpx:getDoctype(@style, $mapToDoctype, 0)}">...
In the stylesheet that generates the xsl would there be any reason to give
the itpx namespace an alias too?

Perhaps I'm just over-thinking it?
Thanks any guidance.
Ian

iTP-X
+44 (0) 7793 324 581
ian.proudfoot@xxxxxxxxxxx

Bembridge
Isle of Wight 
United Kingdom

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.