This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4149 - [XSLT 2.0] Missing parenthesis in example
Summary: [XSLT 2.0] Missing parenthesis in example
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Proposed Recommendation
Hardware: PC Windows XP
: P2 minor
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-05 16:54 UTC by Michael Kay
Modified: 2007-01-16 17:51 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-01-05 16:54:22 UTC
The following comment was raised on the W3C XSL WG list, and is copied here for the record. It will be fixed editorially.

In 18.1.1 Testing Availability of Functions

Example: Stylesheet portable between XSLT 2.0 and a future version of XSLT

<xsl:value-of select="pad($input, 10)"
               use-when="function-available('pad', 2)"/>  <xsl:value-of select="concat($input, string-join(
                          for $i in 1 to 10 - string-length($input)
                                                  return ' ', ''))"
               use-when="not(function-available('pad', 2)"/>


a ')' is missing, so should be

<xsl:value-of select="pad($input, 10)"
               use-when="function-available('pad', 2)"/>  <xsl:value-of select="concat($input, string-join(
                          for $i in 1 to 10 - string-length($input)
                                                  return ' ', ''))"
               use-when="not(function-available('pad', 2))"/>

Mohamed

--
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Comment 1 Michael Kay 2007-01-05 18:16:37 UTC
This bug report prompted me to do some further syntax checking of examples, and this revealed other trivial errors:

In 3.14, the inline schema example is missing a namespace declaration of the XML Schema namespace

In 6.6, the end tag </apply-template> should be </apply-templates>

Also in 6.6, the <xsl:with-param name="init"/> that appears as a child of <xsl:template> should be <xsl:param>

In 11.1.3, xsl:version=1.0" is missing the quotes after the equals sign

In 12.2, Example: Numbing the Items in an Ordered List, the end tag of xsl:template is missing its "/"

In 13.2, the as attribute of the xsl:function named bib:books-by-price is missing its closing quotes

I have fixed all of these editorially.
Comment 2 Michael Kay 2007-01-05 18:23:00 UTC
Yes, that example really is entitled "Numbing the Items in an Ordered List" - I'll fix that too.