This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: namespaces and extensions and multiple files


You also need to use xsl:extension-element-prefixes="#default" on the
extension element. xt doesn't implement this part of the spec.

Mike Kay

> -----Original Message-----
> From:	Oliver Becker [SMTP:obecker@informatik.hu-berlin.de]
> Sent:	Thursday, July 27, 2000 11:51 AM
> To:	xsl-list@mulberrytech.com
> Subject:	Re: namespaces and extensions and multiple files
> 
> Hi, 
> 
> > I want my XSL file to handle all the variants of the "multiple output
> > file" scenario; to avoid a load of namespace declarations at the
> > front, I thought I'd be clever and use the "xmlns" attribute on the
> > extension element itself, thusly:
> > 
> >  <xsl:when test="contains($processor,'Clark')">
> >   <document xmlns="http://www.jclark.com/xt" href="{$filename}">
> >    <xsl:call-template name="writestone"/>
> >   </document>
> >  </xsl:when>
> > 
> >  <xsl:when test="contains($processor,'SAXON')">
> >   <output xmlns="http://icl.com/saxon" file="{$filename}">
> >    <xsl:call-template name="writestone"/>
> >   </output>
> >  </xsl:when>
> > 
> >  <xsl:when test="contains($processor,'Apache')">
> >   <write xmlns="org.apache.xalan.xslt.extensions.Redirect"
> file="{$filename}">
> >    <xsl:call-template name="writestone"/>
> >   </write>
> >  </xsl:when>
> > 
> >  <xsl:when test="contains($processor,'Oracle')">
> >   <output use="oout"  xmlns="http://www.oracle.com/XSL/Transform/java" 
> href="{$filename}">
> >    <xsl:call-template name="writestone"/>
> >   </output>
> > 
> > XT accepts this, and does what I expect. The other three don't. Would
> > anyone care to express a view on whether this *should* work?
> 
> In 14.1 of http://www.w3.org/TR/xslt#extension-element
> it is stated
> "When such an extension element is instantiated, then the XSLT processor 
> must perform fallback for the element as specified in [15 Fallback]. An 
> XSLT processor must not signal an error merely because a template contains
> 
> an extension element for which no implementation is available."
> 
> Hmm ...
> 
> OTOH in 15 it reads
> "However, when an XSLT processor performs fallback for an instruction 
> element, if the instruction element has one or more xsl:fallback children,
> 
> then the content of each of the xsl:fallback children must be instantiated
> 
> in sequence; otherwise, an error must be signaled."
> 
> If this means that you *must* provide an xsl:fallback element, you should
> add <xsl:fallback/> in each of your extension elements and see what
> happens.
> 
> Cheers,
> Oliver
> 
> 
> /-------------------------------------------------------------------\
> |  ob|do        Dipl.Inf. Oliver Becker                             |
> |  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
> |  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
> \-------------------------------------------------------------------/
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]