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

RE: namespace-alias problem

Subject: RE: namespace-alias problem
From: "Touchtel" <omprakashv@xxxxxxxxxxxxxxxxx>
Date: Sun, 23 Jan 2005 15:07:36 +0530
namespace alias not working
Hi Joris,
   I appreciate your help. I am able to get this to work.

Regards,
Omprakash.V


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


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.

Hi,

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"/>
</xsl:attribute>

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

</xsl:element>

<xsl:apply-templates />

</x:stylesheet>

</xsl:template>

<xsl:template match="student">

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

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

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

</xsl:if>

</xsl:template>

</xsl:stylesheet>



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

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.