RE: [xsl] Generating an XSL from an XML

Subject: RE: [xsl] Generating an XSL from an XML
From: "bryan" <bry@xxxxxxxxxx>
Date: Tue, 14 May 2002 16:23:14 +0200
Remy wrote
>For examplee, i wanted to use an xml defining a format, and generate
>default xsl stylesheet able to parse an xml using that format into a
>I was inquisitive to know whether there were another option than using
><![CDATA section for every XSL instruction i wanted to generate, so
that >the parser didn't try to execute them.

Associate your xslt elements with another namespace prefix, as follows

    xmlns:asl=""; version="1.0"
	xmlns:xsl=""; version="1.0"
      xmlns:xslt= >

then you can say the following:
<xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>

<asl:template match="/">
<asl:template match="params">
<asl:for-each select="p">
<xslt:param name="{.}" select="{@value}"/>

I like this because you can keep separate your stylesheet generating
stuff asl: from your stylesheet stuff xslt: 

Depending on your processor your output will either have all the xslt
changed to xsl, or you'll have something like this(in Saxon for example)

 xmlns:xslt=""; version="1.0">
....and so forth

 XSL-List info and archive:

Current Thread