[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: namespaces and extensions and multiple files
Subject: Re: namespaces and extensions and multiple files From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 27 Jul 2000 12:50:47 +0200 (MET DST) |
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@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: ANN: xmlgrep 0.1, a progressive, Matt Sergeant | Thread | Re: namespaces and extensions and m, Sebastian Rahtz |
RE: asp & xsl, Kvan | Date | Re: XSLT merging XML documents, T_MULLEN 58211 6th S |
Month |