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 Michael Ludwig <mi...@gmx.de> on 2009/04/06 22:59:18 UTC

Re: Question regarding different behaviour between using command line invocation and standard call

Claus Kick schrieb am 06.04.2009 um 16:00:28 (+0200):
> 
> <?xml version="1.0" encoding="Cp1252"?>

That's invalid. The encoding has to be specified using the official,
cross-platform IANA names. See:

  http://www.w3.org/TR/REC-xml/#IANA
  http://www.iana.org/assignments/character-sets

> The command line calls never complained about this

Mine do.

> calling the transformer directly yields
> 
> file:///C:/temp/tmpexport4/tmpexport4; Line #1; Column #40; Invalid
> encoding name "Cp1252".

That's what you should get.

> And my result XML file is empty.

The data can't be parsed, because it's not valid XML, so there is no
input tree for the transformer, and the transformation isn't started.

> Normally, I cannot change the XML I receive.

Your data is not valid XML. So there's arguably some reason for an
exception here ...

> If, for testing purposes I change CP1252 to "windows-1252", the
> transformer does not complain.

And it shouldn't, because that's the correct name.

> What have I overlooked in configuring the transformer?

I haven't checked, but the problem here is your data provider.

Best,

Michael Ludwig