> Berin,
>
>> Hmm, don't like that!  Can you send me the full document as an
>> attachment?  The library definitely supports WithComments, so it
>> shouldn't be an issue there.
> I belive I've found what the problem is. Interoperability between Java &
> C++ libraries fails when there is XML pre processing instruction for
> stylesheet in XMl file. I'm attaching both XML files, with and without
> stylesheet instruction. XML file with stylesheet instruction have
> invalid signature in C++ and valid in Java XSEC library.
>
> Best regards,
> Milan
>

Hi,
  I supose that the original document has the PI, right?. Reading the c14n
spec seems that the Java is the correct one. As you are not using any
xpath transformation the PI must be emited. As reads in the spec:
<cite>

The examples in this section assume a non-validating processor, primarily
so that a document type declaration can be used to declare entities as
well as default attributes and attributes of various types (such as ID and
enumerated) without having to declare all attributes for all elements in
the document. As well, one example contains an element that deliberately
violates a validity constraint (because it is still well-formed).
3.1 PIs, Comments, and Outside of Document Element
==================================================
Input Document:
---------------
<?xml version="1.0"?>

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

<!DOCTYPE doc SYSTEM "doc.dtd">

<doc>Hello, world!<!-- Comment 1 --></doc>

<?pi-without-data     ?>

<!-- Comment 2 -->

<!-- Comment 3 -->

Canonical Form (uncommented):
------------------------------
<?xml-stylesheet href="doc.xsl"
   type="text/xsl"   ?>
<doc>Hello, world!</doc>
<?pi-without-data?>

Canonical Form (commented):
---------------------------
<?xml-stylesheet href="doc.xsl"
   type="text/xsl"   ?>
<doc>Hello, world!<!-- Comment 1 --></doc>
<?pi-without-data?>
<!-- Comment 2 -->
<!-- Comment 3 -->



</cite>

Reply via email to