Re: [xslt] Why is an invalid stylesheet parameter value not an error?



On 2008-04-15 10:52:03 +0200, Bernhard Zwischenbrugger wrote:
> For me it doesn't look like a bug.

In fact, I'd say that the xsltproc man page is buggy:

       --param PARAMNAME PARAMVALUE
           Pass a parameter of name PARAMNAME and value PARAMVALUE to
           the stylesheet. You may pass multiple name/value pairs up
           to a maximum of 32. If the value being passed is a string
           rather than a node identifier, use --stringparam instead.
                         ^^^^^^^^^^^^^^^

A node identifier? The XPath spec says:

  An element node may have a unique identifier (ID). This is the value
  of the attribute that is declared in the DTD as type ID. No two
  elements in a document may have the same unique ID. If an XML
  processor reports two elements in a document as having the same
  unique ID (which is possible only if the document is invalid) then
  the second element in document order must be treated as not having a
  unique ID.

But it isn't the same thing. I'd say:

  --param PARAMNAME PARAMVALUE
     Pass a parameter of name PARAMNAME and value PARAMVALUE (written
     as an XPath expression) to the stylesheet. You may pass multiple
     name/value pairs up to a maximum of 32. If the value being passed
     is a string, you can use --stringparam instead, to avoid additional
     quote characters that appear in string expressions.

and

  --stringparam PARAMNAME PARAMVALUE
     Pass a parameter of name PARAMNAME and value PARAMVALUE where
     PARAMVALUE is a string rather than a generic XPath expression.
     Note: The string must be UTF-8 encoded.

-- 
Vincent Lefèvre <vincent vinc17 org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]