RE: Built-in template rule nitpicking
interesting. My guess is that you're right and it's an oversight (unless there's something I'm missing). Might be worthy to post this to the W3C xsl-editors list. Evan Lenz elenz@xxxxxxxxxxx http://www.xyzfind.com XYZFind, the search engine *designed* for XML Download our free beta software: http://www.xyzfind.com/beta -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Jan Nelson Sent: Thursday, October 19, 2000 2:38 PM To: xsl-list@xxxxxxxxxxxxxxxx Subject: Built-in template rule nitpicking 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format