Subject: Built-in template rule nitpicking From: Jan Nelson <jan@xxxxxxxxxxxxx> Date: Thu, 19 Oct 2000 17:37:31 -0400 |
Hello everyone, I have a question on a rather fine point of the XSLT spec, concerning which built-in template rules take effect in a given mode. From the spec: --------------------------- 5.8 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 template rule in the stylesheet. This template 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 each mode, which allows recursive processing to continue in the same mode in the absence of a successful pattern match by an explicit template rule in the stylesheet. This template rule applies to both element nodes and the root node. The following shows the equivalent of the built-in template rule for mode m. <xsl:template match="*|/" mode="m"> <xsl:apply-templates mode="m"/> </xsl:template> There is also a built-in template rule for text and attribute nodes that copies text through: <xsl:template match="text()|@*"> <xsl:value-of select="."/> </xsl:template> [details of comment/PI/namespace rules deleted] --------------------------- By a strict interpretation of this section, it seems there are no built-in rules for text or attibute nodes outside of the initial mode; however, XT and Saxon do implement mode-specific built-in rules for these nodes, similar to the mode-specific rules for element and root nodes. Since these processors are generally regarded as the most conformant available, but the spec seems to clearly omit these built-in rules, I am confused as to who is right. After all, having mode-specific rules for elements but not attributes or text nodes doesn't seem to make much sense, so is this just an oversight on the part of the W3C? (Or is my reading of the spec just wrong??) Any clarification would be greatly appreciated! Jan XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Fw: THANK YOU !!!!!, Melvyn Rosengarden | Thread | RE: Built-in template rule nitpick, Evan Lenz |
Re: Emacs PSGML mode for XSL, Tony Graham | Date | RE: Error 80004005 eof - Microsoft , Andrew Kimball |
Month |