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

RE: [xsl] namespace-alias problem

Subject: RE: [xsl] namespace-alias problem
From: "Touchtel" <omprakashv@xxxxxxxxxxxxxxxxx>
Date: Sun, 23 Jan 2005 15:07:36 +0530

Hi Joris,
   I appreciate your help. I am able to get this to work.


-----Original Message-----
From: Joris Gillis [mailto:roac@xxxxxxxxxx]
Sent: Sunday, January 23, 2005 2:33 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] namespace-alias problem

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

>     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"  

<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