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

Re: Problem with example from faq

Subject: Re: Problem with example from faq
From: Scott Boag <sboag@xxxxxxxxxxxxx>
Date: Thu, 11 Nov 1999 18:50:53 -0500
xsl template mode example
I found the prefix for the xsl namespace missing, xsl:apply-templates
was xsl:apply-template, and "ancestor::*" was "acestor::*".

When I run the modified stylesheet:

<?xml version="1.0"?>
<!--
<xsl:stylesheet xmlns:="http://www.w3.org/1999/XSL/Transform">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<xsl:apply-templates mode="start" select="//z"/>
</xsl:template>

<xsl:template mode="start" match="*">
<xsl:text>&#xa;Document order:</xsl:text>
<xsl:for-each select="ancestor::*">
       <xsl:text>&#xa;Element:</xsl:text>
</xsl:for-each>
<xsl:text>&#xa;&#xa;Axis Order:</xsl:text>
<xsl:apply-templates select="ancestor::*[1]"/>
</xsl:template>

<xsl:template match="*">
<xsl:text>&#xa;Element:</xsl:text>
<xsl:value-of select="name()"/>
<xsl:apply-templates select="ancestor::*[1]"/>
</xsl:template>

</xsl:stylesheet>

...it seems to work fine (at least from my quick glance).  This is with
LotusXSL 0.18.5.  You should have seen some output with the namespace
broken, or good error messages.

-scott

Esfandiar Mazdeh wrote:

> Hello,I have tried to run the following xml,xsl combination which I
> picked fromxsl-faq and modified a little. However, Lotusxsl does not
> show anything:xml file:<?xml version="1.0"?><test><a>this is a<b>this
> is b<c>this is c<d>this is d<e>this is e<f>this is f<g>this is
> g<h>this is h<i>this is i<j>this is j<k>this is k<l>this is l<m>this
> is m<n>this is n<o>this is o<p>this is p<q>this is q<r>this is
> r<s>this is s<t>this is t<u>this is u<v>this is v<w>this is w<x>this
> is x<y>this is y<z>this is
> z</z></y></x></w></v></u></t></s></r></q></p></o></n></m></l></k></j></i></h></g></f></e></d></c></b></a></test>xsl
> file:<?xml version="1.0"?><!--<xsl:stylesheet
> xmlns:="http://www.w3.org/1999/XSL/Transform"><xsl:stylesheet
> xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">--><xsl:stylesheet
> version="1.0" xmlns:="http://www.w3.org/1999/XSL/Transform">
>  <xsl:template match="/"><xsl:apply-template mode="start"
> select="//z"/></xsl:template><xsl:template mode="start"
> match="*"><xsl:text>&#xa;Document order:</xsl:text><xsl:for-each
> select="acestor::*"><xsl:text>&#xa;Element:</xsl:text></xsl:for-each><xsl:text>&#xa;&#xa;Axis
> Order:</xsl:text><xsl:apply-templates
> select="ancestor::*[1]"/></xsl:template><xsl:template
> match="*"><xsl:text>&#xa;Element:</xsl:text><xsl:value-of
> select="name()"/><xsl:apply-templates
> select="ancestor::*[1]"/></xsl:template></xsl:stylesheet>Can anyone
> tell me why?Thanks.
> ====================================================================
> Esfandiar Steve Mazdeh         Informix
> Email: emazdeh@xxxxxxxxxxxx         4100 Bohanon Driver
> Phone: (650) 926-1062                     Menlo Park, CA
>                      http://www.informix.com
> ====================================================================


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


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.