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

Re: problem!! - Built-in template Rules?

Subject: Re: problem!! - Built-in template Rules?
From: Shekhar Kshirsagar <skshirsa@xxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Feb 1999 11:27:36 -0500
Re: problem!! - Built-in template Rules?
I thought there are supposed to be some built-in template rules which
should take care of
such cases. 
I suppose IE5 implementation is not implementing these built-in template
rules,
or Am I misunderstanding something here?

Thanks & Regards,
Shekhar Kshirsagar
Nortel Networks.


Reference from XSL Draft (Section 2.5.2) :

-2.5.2 Built-in Template Rules
-There is a built-in template rule to allow recursive processing to
continue in the absence of a -successful pattern match by an explicit rule
in the stylesheet. This rule applies to both element nodes -and the root
node. The following shows the equivalent of the built-in template rule:
-
-<xsl:template match="*|/">
-  <xsl:apply-templates/>
-</xsl:template>

-There is also a built-in template rule for text nodes that copies text
through:

-<xsl:template match="text()">
-  <xsl:value-of select="."/>
-</xsl:template>

-The built-in rule does not apply to processing instructions and comments.
When a comment or processing -instruction is processed, and no rule is
matched, nothing is created.

-The built-in template rules are treated as if they were imported
implicitly before the stylesheet and so -are considered less important than
all other template rules. Thus the author can override a built-in -rule by
including an explicit rule with match="*|/" or match="text()".

At 10:35 AM 2/25/99 -0000, Juliane Harbarth wrote:
>
>A <xsl:stylesheet> clause is supposed to contain some
><xsl:template> clauses to describe how certain XML-
>elements are to be formatted. The <xsl:for-each>
>clause is something that may occur within a
><xsl-template>. See example below for proper nesting
>Please refer to Microsoft's XSL Reference for details,
>i.e. http://www.microsoft.com/xml
>
><?xml version="1.0"?>
><xsl:stylesheet
>       xmlns:xsl="http://www.w3.org/TR/WD-xsl"
>       xmlns="http://www.w3.org/TR/REC-html40"
>       result-ns="">
>
> 	<xsl:template match="/">
> 	 <HTML>
>	  <HEAD>
>	   <TITLE>Test</TITLE>
>	  </HEAD>
> 	  <BODY>
> 	   <xsl:apply-templates/>  
> 	  </BODY>
> 	 </HTML>
> 	</xsl:template>
>
>    	<xsl:template match="*">
>         <xsl:apply-templates/>  
>    	</xsl:template>
>
>    	<xsl:template match="persons">
><xsl:for-each select="person">
>   <h1><xsl:value-of select="firstname"/></h1>
>   <h1><xsl:value-of select="lastname"/></h1>
></xsl:for-each>
>    	</xsl:template>
>
>    	<xsl:template match="textnode()">
>         <xsl:value-of select="."/>
>    	</xsl:template>	
>
></xsl:stylesheet>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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.