Re: [xslt] Xpath on variables?



[ This starts to get on my nerves, XSLT processors out there seems to not
  care about compliance on nodeset vs. result tree fragment, this occured
  just one more time, if W3C want to get its standards or Recommendations
  respected, a minimal cleanup seems in order, Daniel
  http://mail.gnome.org/archives/xslt/2001-August/msg00024.html   ]

On Mon, Aug 06, 2001 at 07:30:56PM +0200, Thomas Broyer wrote:
> Le 06/08/01 17:40:34, Heiko Rupp a écrit :
> > > if $foo is a result tree fragment.
> > 
> > How?
> 
> Read the spec!
> http://www.w3.org/TR/xslt#section-Result-Tree-Fragments
> 
> > <xsl:variable name="foo">
> > <FOO>
> >         <BAR arg="1">
> >         test
> >         </BAR>
> > </FOO>
> > </xsl:variable>
> 
>   "If the variable-binding element does not have a select attribute
>    and has non-empty content (i.e. the variable-binding element has
>    one or more child nodes), then the content of the variable-binding
>    element specifies the value. The content of the variable-binding
>    element is a template, which is instantiated to give the value of
>    the variable. The value is a result tree fragment equivalent to a
>    node-set containing just a single root node having as children the
>    sequence of nodes produced by instantiating the template."
> 
> > <xsl:copy-of select="$foo//BAR"/>
> 
>   "In particular, it is not permitted to use the /, //, and [] operators
>    on result tree fragments."
> 
> > Xalan-C:
> 
> Which version?
> 
> > Saxon 6.4.3:
> 
> In <http://saxon.sourceforge.net/saxon6.4.3/conformance.html>
>   "SAXON will automatically convert a result tree fragment to a node-set
>   when required, as defined in the draft XSLT 1.1 specification."
> 
> Note that XSLT 1.1 has been given up, it is not normative, just a working
> draft.
> 
> > libxslt 1.0.0:
> > 
> > xsltproc foo.xsl foo.xml
> > Error xpath.c:7416: Invalid type
> > Error xpath.c:7416: Invalid type
> 
> libxslt is XSLT 1.0 -conformant.

  I'm tempted to drop the checking (but emit a warning, anyway the current
message is not informative enough) but considering that both Michael Kay
and IBM (Sharon, do you hear me ?) are key players of the XSL Working Group
and seems to just don't care about conformance on this issue (the stylesheet
is labelled version="1.0", i.e. no excuse) I don't see why I should be
penalized compared to others processors just because I dared to implement
the spec !

  This makes me grumpy,

Daniel

P.S.: and the 1.1 draft is still not labelled as deprecated !
      http://www.w3.org/TR/xslt11/

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




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