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

Re: Multiple output types and embedded documentation

Subject: Re: Multiple output types and embedded documentation
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 3 Jul 2000 09:38:47 +0100 (BST)
Re: Multiple output types and embedded documentation
> If I'm right, this would be a 'weave' solution.
> For documentation you'd run a stylesheet to pull the doc:
> elements?

that's weave, but for Warren's version, where the original file isn't 
directly usable then you also need "tangle" to extract a runnable
stylesheet from the documented sources.


> Presumably, using this format, you would swap out the namespace
> of either out_1 or out_2 and replace it with the xsl namespace, to 
> select the actual output wanted?



> Questions:
> 
> 1. How do you 'disable' output from the undesired namespaces
>     when not in use.
> 2. I don't understand the 'intermediate step' idea above.

You'd do something along the lines of the following (ignoring
attributes for now)

when applied to the documented source, it copies xsl namespaced elements
throws away doc elements and out_1 elements, and moves any out_2
elements into the xsl namespace.

Thus the result would be a usable stylesheet without documenattion and
using the "out_2" version of the code.

David



<xsl:template match="xsl:*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

<xsl:template match="doc:*"/>
<xsl:template match="out_1:*"/>


<xsl:template match="out_2:*">
<xsl:element name="local-name()"
             namespace="http://www.w3.org/1999/XSL/transform">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>


 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.