[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@xxxxxxxxxxxxxxxxxxxxxxx] > Sent: Thursday, July 27, 2000 11:51 AM > To: xsl-list@xxxxxxxxxxxxxxxx > 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@xxxxxxxxxxxxxxxxxxxxxxx | > | 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|