[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: namespace declaration
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
|
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
|