[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] namespace-alias problem

Subject: Re: [xsl] namespace-alias problem
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Sun, 23 Jan 2005 10:03:20 +0100

Tempore 06:15:16, die 01/23/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Touchtel <omprakashv@xxxxxxxxxxxxxxxxx>:

Iam using a stylesheet to generate another stylesheet and having some
problems like the processor not recognising the aliased namespace (x:) the
2nd time around. The following are my xml and and input and output
stylesheet snippets. The snippets are quite large but I am not sure how to
make these smaller than this.


Do the following things to make it work:
* omit 'exclude-result-prefixes="x"'
* write <xsl:element name="xsl:template"/> (or <x:template/>) rather than <xsl:element name="x:template"/>

This is a working stylesheet:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/XSL/TransformAlias">

<xsl:namespace-alias stylesheet-prefix="x" result-prefix="xsl"/>

<xsl:output method="xml" indent="yes" encoding="iso-8859-1"/>

<xsl:template match="school">
    <x:stylesheet version="1.0">
<x:strip-space elements="*"/>

<xsl:element name="xsl:template">
<xsl:attribute name="match">
<xsl:value-of select="person"/>

    This is the body text
 <x:with-param name="path" select="person"/>


<xsl:apply-templates />



<xsl:template match="student">

<xsl:if test="not(@name='person')">

<xsl:element name="xsl:template">
<xsl:attribute name="match">
<xsl:value-of select="@name" />

<a href="#">This is a student <x:value-of select="@name"/></a>




Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Deserta faciunt et innovationem appelant

Current Thread