Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] XOM Canonicalization: whitespace outside document element

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Michael Kay <mike AT saxonica.com>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] XOM Canonicalization: whitespace outside document element
  • Date: Tue, 10 Apr 2018 17:19:14 +0100

If I canonicalize the document

<?xml-stylesheet type="text/xsl" href="bills.xsl"?>
<Bills/>

I would expect the result

<?xml-stylesheet type="text/xsl" href="bills.xsl"?><Bills></Bills>

But XOM gives me

<?xml-stylesheet type="text/xsl" href="bills.xsl"?>
<Bills></Bills>

That is, it retains the newline after the processing instruction.

The specification (https://www.w3.org/TR/xml-c14n11/#DataModel) says

Whitespace outside of the root document element MUST be discarded.

Is this a bug?

Michael Kay
Saxonica




Archive powered by MHonArc 2.6.24.

Top of Page