Project

Profile

Help

Support #1940

closed

Content "MLSch " (empty space is a tab symbol) appears in the XdmNode object serialized with toString()

Added by Aliaxei Voitsik over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Serialization
Sprint/Milestone:
-
Start date:
2013-11-29
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

  1. Steps to reproduce

Provided Java project contains test to reproduce the issue

unzip CheckSaxonFileLoad.zip

cd CheckSaxonFileLoad

mvn test

  1. Expected result

Proper serialization. In particular, no mixed-content elements are expected.

  1. Actual result

Serialized node contains mixed-content element.

Content "MLSch " (empty space is a tab symbol) appears in the serialized XdmNode object.

  1. Notes

The source file itself is a valid XML document.

The libraries checked are: Java (1.6.0_45, 1.7.0_45), Saxon HE (9.4.0.7, 9.4.0.9, 9.5.1-3).

With Saxon HE 9.4 I get no error.

When I explicitly add Xerces library (2.6.2, 2.8.0, 2.8.1, 2.9.1, 2.11.0) to test module deps,

I also see no error.

Attached files contain both normal and broken serializations and screenshot with their comparison.


Files

CheckSaxonFileLoad.zip (4.86 KB) CheckSaxonFileLoad.zip Aliaxei Voitsik, 2013-11-29 10:45
Screenshot_compare_serialized.png (77.9 KB) Screenshot_compare_serialized.png Aliaxei Voitsik, 2013-11-29 10:45
serializedBad.xml (24.1 KB) serializedBad.xml Aliaxei Voitsik, 2013-11-29 10:45
serializedFine.xml (24.1 KB) serializedFine.xml Aliaxei Voitsik, 2013-11-29 10:45
Actions #1

Updated by Michael Kay over 10 years ago

  • Assignee changed from Community Admin to Michael Kay

Sorry for the delay in responding to this.

This error, as far as I can tell, occurs when you use the Xerces parser bundled in the JDK, and does not occur when you use Apache Xerces.

This is unfortunately a common experience. The parser in the JDK is buggy, and I do not recommend its use.

There is nothing we can do about this in Saxon other than recommending that people use the Apache parser.

I don't believe the problem is in serialisation; the parser is reporting incorrect data to Saxon.

Actions #2

Updated by Michael Kay over 10 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Resolved
  • Priority changed from Low to Normal
Actions #3

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from Resolved to Closed

If it is ok. I am closing this issue with no action.

Please register to edit this issue

Also available in: Atom PDF