You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Raoul Cridlig <rc...@datasystem.fr> on 2011/11/09 14:52:36 UTC
Namespace attribute order
Hi,
I'm using xalan 2.7.1.
My xml stream to be transformed is generated by JaxB, which is
generating his own namespace attribute order.
But this order is not xalan compatible.
Example:
<Transaction xmlns="http://www.av2s.com/xft"
xsi:type="TransactionRequestType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="TransactionRequestType" ...>
....
</Transaction>
I get this error during XSL transformation:
org.apache.crimson.parser/P-084 xsi:type
; Line#: 1; Column#: -1
javax.xml.transform.TransformerException:
org.apache.crimson.parser/P-084 xsi:type
at
org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:742)
I thought crimson project had been retired...
It's seem that the xsi namespace need to be defined as an attribute
before use (xsi:type). Whereas attribute order in XML
specification don't need to be managed.
so, who's wrong (jaxB attribute creation order or xalan XSLT attribute
order reading ?
Best Regards,
Raoul Cridlig
<ma...@datasystem.fr>
Re: {Disarmed} RE: Namespace attribute order
Posted by Raoul Cridlig <rc...@datasystem.fr>.
Thx; here I am now in the next error step ;-)
java.lang.NullPointerException
at
org.apache.xalan.transformer.TransformerImpl.setOutputProperty(TransformerImpl.java:966)
My java code is quite simple:
...
Transformer transformer = ts.newTransformer();
>>>>>>>transformer.setOutputProperty(OutputKeys.INDENT,
"no");<<<<<< line where the
exception is thrown
Raoul Cridlig
Le 09/11/2011 15:02, Gary Gregory a écrit :
>
> Yes, I would give that a shot. The JVM is probably picking up the
> first JAXP compliant parser it finds.
>
> Gary
>
> *From:*Raoul Cridlig [mailto:rcridlig@datasystem.fr]
> *Sent:* Wednesday, November 09, 2011 8:59 AM
> *To:* Gary Gregory
> *Cc:* xalan-j-users@xml.apache.org
> *Subject:* Re: {Disarmed} RE: Namespace attribute order
>
> Yes, all the jars pack founded inside xalan-j_2_7_1-bin.zip:
> - serializer.jar
> - xalan.jar
> - xercesImpl.jar
> - xml-apis
>
> But I also have crimson.jar. May be should I delete this jar from my
> classpath to resolve this error ?
>
> *Raoul Cridlig***
>
>
> Le 09/11/2011 14:56, Gary Gregory a écrit :
>
> Hi Raoul,
>
> Do you have both Xerces and Xalan on your endorsed classpath?
>
> Gary
>
> *From:*Raoul Cridlig [mailto:rcridlig@datasystem.fr]
> *Sent:* Wednesday, November 09, 2011 8:53 AM
> *To:* xalan-j-users@xml.apache.org <ma...@xml.apache.org>
> *Subject:* Namespace attribute order
>
> Hi,
>
> I'm using xalan 2.7.1.
> My xml stream to be transformed is generated by JaxB, which is
> generating his own namespace attribute order.
> But this order is not xalan compatible.
>
> Example:
> <Transaction xmlns=*MailScanner has detected a possible fraud attempt
> from "www.av2s.com" claiming to be* "http://www.av2s.com/xft"
> <http://www.av2s.com/xft> xsi:type="TransactionRequestType"
> xmlns:xsi=*MailScanner has detected a possible fraud attempt from
> "www.w3.org" claiming to be*
> "http://www.w3.org/2001/XMLSchema-instance"
> <http://www.w3.org/2001/XMLSchema-instance>
> xsi:type="TransactionRequestType" ...>
> ....
> </Transaction>
>
> I get this error during XSL transformation:
> org.apache.crimson.parser/P-084 xsi:type
> ; Line#: 1; Column#: -1
> javax.xml.transform.TransformerException:
> org.apache.crimson.parser/P-084 xsi:type
> at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:742)
>
> I thought crimson project had been retired...
>
> It's seem that the xsi namespace need to be defined as an attribute
> before use (xsi:type). Whereas attribute order in XML
> specification don't need to be managed.
>
> so, who's wrong (jaxB attribute creation order or xalan XSLT
> attribute order reading ?
>
> Best Regards,
>
> *Raoul Cridlig*
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
Re: {Disarmed} RE: Namespace attribute order
Posted by Raoul Cridlig <rc...@datasystem.fr>.
Yes, all the jars pack founded inside xalan-j_2_7_1-bin.zip:
- serializer.jar
- xalan.jar
- xercesImpl.jar
- xml-apis
But I also have crimson.jar. May be should I delete this jar from my
classpath to resolve this error ?
Raoul Cridlig
Le 09/11/2011 14:56, Gary Gregory a écrit :
>
> Hi Raoul,
>
> Do you have both Xerces and Xalan on your endorsed classpath?
>
> Gary
>
> *From:*Raoul Cridlig [mailto:rcridlig@datasystem.fr]
> *Sent:* Wednesday, November 09, 2011 8:53 AM
> *To:* xalan-j-users@xml.apache.org
> *Subject:* Namespace attribute order
>
> Hi,
>
> I'm using xalan 2.7.1.
> My xml stream to be transformed is generated by JaxB, which is
> generating his own namespace attribute order.
> But this order is not xalan compatible.
>
> Example:
> <Transaction xmlns=*MailScanner has detected a possible fraud attempt
> from "www.av2s.com" claiming to be* "http://www.av2s.com/xft"
> <http://www.av2s.com/xft> xsi:type="TransactionRequestType"
> xmlns:xsi=*MailScanner has detected a possible fraud attempt from
> "www.w3.org" claiming to be*
> "http://www.w3.org/2001/XMLSchema-instance"
> <http://www.w3.org/2001/XMLSchema-instance>
> xsi:type="TransactionRequestType" ...>
> ....
> </Transaction>
>
> I get this error during XSL transformation:
> org.apache.crimson.parser/P-084 xsi:type
> ; Line#: 1; Column#: -1
> javax.xml.transform.TransformerException:
> org.apache.crimson.parser/P-084 xsi:type
> at
> org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:742)
>
> I thought crimson project had been retired...
>
> It's seem that the xsi namespace need to be defined as an attribute
> before use (xsi:type). Whereas attribute order in XML
> specification don't need to be managed.
>
> so, who's wrong (jaxB attribute creation order or xalan XSLT
> attribute order reading ?
>
> Best Regards,
>
> *Raoul Cridlig***
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.