[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: namespace declaration

Subject: Re: namespace declaration
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 10 Apr 2002 15:39:15 +0100
xalan exclude result prefixes
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.