Hi Damon

Is the xmlns declared in the XSLT too? What does the XSLT look like?

Con

-----Original Message-----
From: Damon van Opdorp [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 12 November 2003 2:43 p.m.
To: [EMAIL PROTECTED]
Subject: XSLT and Namespaces Problem


Hi all,

I've having a problem getting XSLT transforms to work where there are namespaces used 
in my xml.  Here is a snippet of the XML going into the transform:

<unit-sale-prices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
list-item="false" empty-object="false" large-item="true" 
xsi:type="java:com.deeperdesign.marketplace.entity.unit.UnitSalePrice" > ...

I'm using the default Xalan based transformer and it's complaining to the log files 
with the following message:

javax.xml.transform.TransformerException: Could not resolve namespace prefix: xsi. The 
node will be ignored.
at org.apache.xalan.transformer.MsgMgr.warn(MsgMgr.java:187)
at org.apache.xalan.transformer.MsgMgr.warn(MsgMgr.java:144)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:344)
at org.apache.xalan.templates.ElemAttribute.execute(ElemAttribute.java:144)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2318)
...

As far as I can see, the xsi namespace is defined, but for some reason my XSLT 
processor isn't noticing the declaration.  The xml is castor generated, it's using the 
xsi namespace so that it can record the type of the objects to make it possible to 
turn the xml back into java objects.  I'm using Cocoon 2.1.1 with Tomcat 4.1.29.  My 
Xalan version is 2.5.1.

Any suggestions welcome :)

Cheers,

Damon

-- 
Damon van Opdorp � Systems Architect � [EMAIL PROTECTED] � +64(21) 23 94 328
Deeper Design Limited � +64(7) 377 3328 � www.deeperdesign.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to