[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] namespace declaration


Subject: Re: [xsl] namespace declaration
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Apr 2002 15:39:15 +0100

Hi Laura,

> i have formed a java class.. called com.xyz.Utils. I am tryin to call this
> in my xsl. apart from this i am also calling the Redirect Class ( for 
> writing to files ) in the same xsl sheet. my xsl header is as follows..
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xalan = "http://xml.apache.org/xalan" exclude-result-prefixes="xalan"
> xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect" 
> extension-element-prefixes="redirect"
> xmlns:bds-utils = "com.xyz.Utils"  extension-element-prefixes ="xyz-utils">
>
> is this kind of a declarartion correct?? because i am gettting an error 
> message saying Error:Duplicate Attribute..
> if i want to make use of different java classes, then how shud the 
> Declaration be??

The problem is that this isn't well-formed. Elements can't have two
attributes with the same name. You need to combine the two
extension-element-prefixes attributes into one -- just concatenate
their values with a space in between (the attribute can take a list of
prefixes):

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xalan = "http://xml.apache.org/xalan"
                exclude-result-prefixes="xalan"
                xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
                xmlns:bds-utils = "com.xyz.Utils"
                extension-element-prefixes ="redirect xyz-utils">
...
</xsl:stylesheet>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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



Current Thread
Keywords
xsl