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

Meta XSL

Subject: Meta XSL
From: Toivo Lainevool <tlainevool@xxxxxxxxx>
Date: Sun, 28 Feb 1999 16:28:11 -0800 (PST)
meta xsl
I am trying to use XSL to generate an XSL stylesheet.  I call
this a meta-XSL stylesheet. I thought that since XSL is valid XML,
this should be possible, but I am having one small 
problem.  If I have a meta-XSL file that looks like this:

<meta-xsl:stylesheet xmlns:xsl="foo"
                xmlns:meta-xsl="http://www.w3.org/TR/WD-xsl"
result-ns="">
<meta-xsl:template match='/'>
   <xsl:stylesheet>
   <html><body>test</body></html>
   </xsl:stylesheet>
</meta-xsl:template>
</meta-xsl:stylesheet>

Running XT on this with any XML file generates the following output:

<xsl:stylesheet
xmlns:xsl="foo"><html><body>test</body></html></xsl:stylesheet>

The problem is I need the "xmlsn:xsl" attribute of the stylesheet
element 
in the output to be "http://www.w3.org/TR/WD-xsl" instead of "foo".

If I try to specify the URI in the meta-XSL stylesheet like this:

<meta-xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
                xmlns:meta-xsl="http://www.w3.org/TR/WD-xsl"
result-ns="">

XT tries to interpret the "xsl" elements in the meta-XSL file as 
valid XSL so it fails.

I know I could run the produced XSL through a quick post-processing step
to add in the right string into the attribute, but I am trying to find a
"pure" XSL solution.

I can get a stylesheet produced that uses the default namespace.  If I
use:

<meta-xsl:stylesheet 
                xmlns:meta-xsl="http://www.w3.org/TR/WD-xsl"
result-ns="">
<meta-xsl:template match='/'>
   <meta-xsl:element name="stylesheet">
   <meta-xsl:attribute
name="xmlns">http://www.w3.org/TR/WD-xsl</meta-xsl:attribute>
   <html><body>test</body></html>
   </meta-xsl:element>
</meta-xsl:template>
</meta-xsl:stylesheet>

XT produces:
<stylesheet
xmlns="http://www.w3.org/TR/WD-xsl"><html><body>test</body></html>
</stylesheet>

Which when itself run through XT fails because the HTML elements are now
in the wrong namespace.  If I could get a XSL stylesheet that use the 
default namespace to specify xsl elements and still produce valid HTML,
it would be a step in the right direction.

There is a thread going on in the list about the use of the result-ns
attribute,
would it make sense to be able to specify "xsl" as the result type of
an xsl transformation?

Any help with this would be greatly appreciated.

As a side note, it is interesting to think about trying to be able to 
produce _any_ valid XML document via XSL, and this case being the
proof of Godel's Incompleteness Theorem for XSL.

Thanks,

Toivo Lainevool




_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Current Thread
  • Meta XSL
    • Toivo Lainevool - Sun, 28 Feb 1999 16:28:11 -0800 (PST) <=
      • <Possible follow-ups>
      • James Tauber - Mon, 1 Mar 1999 12:38:15 +0800

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.