On 05/13/2011 11:43 PM, Cliff Zhao wrote:
> When open my existing dita document, the XMLEditor automatically added
> the ditaarch namespace, that causes dita open toolkit failed with the
> following error:
> Error reported by XML parser Cause: org.xml.sax.SAXParseException:
> Attribute "ditaarch" bound to namespace "http://www.w3.org/2000/xmlns/";
> was already specified for element "concept".

The above error message also signals a non-sensical situation:
---
Attribute "ditaarch" bound to namespace "http://www.w3.org/2000/xmlns/";
---
which cannot be caused by something done by our product.

I think you have found a bug in the DITA Open Toolkit. Please take the
time to report this bug to the developers of the DITA Open Toolkit.

In fact, this bug is almost certainly caused by the DITA 1.2 XML Schema,
which is very, very, buggy. We strongly recommend DITA 1.2 authors to
use the DTD instead of the XML schema.



> 
> My document is like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <concept id="mydoc"
> 
>         
> xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:concept.xsd:1.2"
> 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> 
>          xmlns:xs="http://www.w3.org/2001/XMLSchema";>
> 
>   <title>TriggerCollectBuilder</title>
> 
> 
>   <conbody>
> 
>     <p>My doc</p>
> 
>   </conbody>
> 
> </concept>
> 
> 
> Open the document, change something and save. The document looks like this:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <concept id="mydoc"
> 
>       
>   xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:concept.xsd:1.2"
> 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> 
>          xmlns:xs="http://www.w3.org/2001/XMLSchema";
> 
>          xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/";>
> 
>   <title>TriggerCollectBuilder</title>
> 
> 
>   <conbody>
> 
>     <p>My doc, changed</p>
> 
>   </conbody>
> 
> </concept>
> 
> 
> Why the following attribute is added to the concept tag?
> xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/";

Because XMLmind XML Editor systematically declares all namespace
bindings on the root element.

Note that there is nothing incorrect or invalid in what does XMLmind XML
Editor. Therefore we do not intend to change our implementation.



> 
> Is there anyway to prevent XMLEditor from adding it?
> 

No.
 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to