https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2019-10-12T23:15:07ZSaxonica Developer CommunitySaxon - Bug #4338: Prefixes for default attribute coming from associated XML Schema are no longer output in the output root elementhttps://saxonica.plan.io/issues/4338?journal_id=143202019-10-12T23:15:07ZMichael Kaymike@saxonica.com
<ul></ul><p>As far as I can see Xerces is reporting the expanded default attribute via the SAX interface in such a way that Attributes.getQName(i) returns a simple local name, so Saxon cannot tell that the attribute is in a namespace.</p>
<p>This example seems to be rather confusing since schema validation is being performed first by Xerces and then again by Saxon. If we cut out the Xerces validation and do Saxon validation alone, then the defaulted attributes end up being correctly namespace-qualified.</p> Saxon - Bug #4338: Prefixes for default attribute coming from associated XML Schema are no longer output in the output root elementhttps://saxonica.plan.io/issues/4338?journal_id=143312019-10-13T21:09:42ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>AwaitingInfo</i></li></ul> Saxon - Bug #4338: Prefixes for default attribute coming from associated XML Schema are no longer output in the output root elementhttps://saxonica.plan.io/issues/4338?journal_id=143332019-10-14T11:37:24ZRadu Coravuradu_coravu@sync.ro
<ul></ul><p>The initial problem was when running DITA OT transformations (which set that VALIDATION feature on the SAX parser in order to expand default @class attribute values from XML Schemas). At that moment in time Oxygen used its Saxon EE to run the DITA OT transformation and that produced the following error in the console:</p>
<pre><code>> [filter] Declare namespace 'dita-ot' -- http://dita-ot.sourceforge.net/ns/201007/dita-ot
> [filter] *** net.sf.saxon.event.ComplexContentOutputter.namespace(NamespaceBinding, int)
> [filter] Declare namespace '' -- http://dita.oasis-open.org/architecture/2005/
> [filter] pendingStartTag is class net.sf.saxon.om.NoNamespaceName
> [filter] elementIsInNullNamespace: 'true'
> [filter] !!!Cannot output a namespace node for the default namespace when the element is in no namespace
> [filter] java.lang.Exception
> [filter] at net.sf.saxon.event.ComplexContentOutputter.namespace(ComplexContentOutputter.java:372)
> [filter] at net.sf.saxon.event.ComplexContentOutputter.checkProposedPrefix(ComplexContentOutputter.java:521)
> [filter] at net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOutputter.java:677)
> [filter] at net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:177)
> [filter] at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:370)
> [filter] at org.dita.dost.writer.DitaWriterFilter.startElement(DitaWriterFilter.java:180)
> [filter] at org.xml.sax.helpers.XMLFilterImpl.startElement(Unknown Source)
</code></pre>
<p>My colleague who investigated the problem managed to reproduce the problem with that small test case I pasted above.
For some time now we have been using the DITA Open Toolkit's bundled Saxon library to run the publishing process so this problem no longer is relevant.
I even tried to run the DITA OT transformation with a licensed Saxon 9.9 but it no longer seems to show the original problem.
So I'll probably comment out this automatic test on my side and we'll leave it at that as I no longer have a way in which an end user could reproduce the problem from inside Oxygen.</p> Saxon - Bug #4338: Prefixes for default attribute coming from associated XML Schema are no longer output in the output root elementhttps://saxonica.plan.io/issues/4338?journal_id=145002019-11-11T15:11:43ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>AwaitingInfo</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Michael Kay</i></li></ul><p>Closing this, as there doesn't seem to be anything further we can do about this problem.</p> Saxon - Bug #4338: Prefixes for default attribute coming from associated XML Schema are no longer output in the output root elementhttps://saxonica.plan.io/issues/4338?journal_id=179802021-05-22T22:58:10ZMichael Kaymike@saxonica.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-2 priority-default closed" href="/issues/4996">Bug #4996</a>: Namespace information missing from default XML Schema attribute added by validating XMLReader</i> added</li></ul>