This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: namespace declaration
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "Laura Jenkins" <xsl_list at hotmail dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 10 Apr 2002 15:39:15 +0100
- Subject: Re: [xsl] namespace declaration
- Organization: Jeni Tennison Consulting Ltd
- References: <F111TuAN76wqaJPyFZ70000826d@hotmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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