0

Using java, i transform HTML to XML. Does encoding type we mention in the XSL file play a role? Because after transformation, there is duplication of content in the XML file where in content gets append in the last and making the file invalid. Not able to replicate this issue again. This happens once in a while.

3
  • Simple test: Use iso-8859-1 as encoding type, while the content contains non-ASCII characters. Commented Aug 2, 2013 at 10:05
  • Sounds more like a bug in the XSL template, but I don't think its related to the encoding. Commented Aug 2, 2013 at 10:07
  • First of all get a sample input. Duplication of content is most likely a parsing things twice by a bug in the rules. IF you cannot follow the logic (appy/match/call), place markers, some "XXX", "YYYY" in rules. Commented Aug 2, 2013 at 10:09

1 Answer 1

0

Nope, the encoding of the xsl itself does not have any connection to the encoding of the source xml or the encoding of the target xml, unless there is a bug in the transformer.

Non the less the the xsl may print characters that are not printable in the target xml's encoding in which case your target xml would contain invalid characters (or the transformer throws an exception I'm not sure).

Finding a solution to your exact problem is rather impossible with this amount of information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.