Page 1 of 1

Commented XML processing instruction is processed (bug?)

Posted: Wed Sep 28, 2005 11:21 pm
by dsewell
With oXygen 6.2, I get unexpected results if I validate a document whose first lines are like this:

Code: Select all

<?xml version="1.0"?>
<?oxygen RNGSchema="FoundingEra-vendor.rng" type="xml"?>
<!-- <?oxygen SCHSchema="GWP.sch"?> -->
As you can see, I didn't want the Schematron schema to be used, so I commented it out. However, the validation tested against the Schematron anyway (it reported errors, so I know it processed the schema).

This looks like a bug to me--oXygen should treat line 3 as an XML comment, right? It should not intepret the processing instruction inside?

Another form of the bug

Posted: Wed Sep 28, 2005 11:26 pm
by dsewell
The processing instruction is also followed if I put junk in front of it:

Code: Select all

<!-- <?FOOBARoxygen SCHSchema="http://rotunda.upress.virginia.edu/Schemas/FE/GWP/GWP.sch"?> -->
So it appears that oXygen is simply looking for a string rather than distinguishing between a comment node and a PI node.

Posted: Thu Sep 29, 2005 8:19 am
by Radu
Hi,

You are right about the problem with the PI being processed even if enclosed in a comment.
We noticed and fixed it just after the 6.2 release. Now, after the PI is searched there is a supplimentary check to see whether it is enclosed in a comment.
We will also fix the "FOOBAR" problem that you noticed.
As a workaround for now you can delete a character from the PI, like remove the "n" in oxygen so that the PI is not recognized anymore.


Regards, Radu.

Thanks!

Posted: Thu Sep 29, 2005 4:15 pm
by dsewell
thanks for the quick fix