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

Re: Writing a stylesheet to create a stylesheet, with

Subject: Re: Writing a stylesheet to create a stylesheet, with XSLT in the XML
From: "Scott Moore" <puffandtoot@xxxxxxx>
Date: Tue, 18 Jun 2002 09:30:41 -0400
writing utf 16 in c
[snip]
> And then you could use namespace-alias and the-power-of-xml to get the
> result you want:
>
> For this xml:
>
> <root>
>   <node>My name is <path>/Doc/FirstName</path>.</node>
> </root>
>
> And this stylesheet:
>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xslt="some_made_up_namespace"
> version="1.0">
>
> <xsl:namespace-alias
>   stylesheet-prefix="xslt"
>   result-prefix="xsl"/>
>
> <xsl:template match="//node">
>   <xsl:variable name="path" select="path"/>
>   <xslt:stylesheet>
>     <xslt:value-of select="{$path}"/>
>   </xslt:stylesheet>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> You get this result:
>
> <?xml version="1.0" encoding="UTF-16"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:value-of select="/Doc/FirstName" />
> </xsl:stylesheet>
>
>
> Im sure this is what you need, but I dont want to second guess your reqs
> - let us know if this is what you want.

This would work fine except we already have a rather robust infrastructure
and schema around the XML file.  To do it your way would require an enormous
amount of rewriting, something just not possible at this time.

It pretty much boils down to the fact that the least amount of work dictates
the use of an attribute, whose value can contain both static and dynamic
(from the DOM) text, which will be placed in the header/footer of the
report.  Originally I wanted to embed XSLT in the attribute, but ended up
with the string parsing routine instead, which works pretty good.  The only
downside is the character | can't be part of the static text, but I really
don't think that's ever going to be a problem.  And I could enhance the
parser to fix it if it ever was a problem.

Scott


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.