Michael LeBlanc wrote:
> 
> This is regarding the addon you prepared for me to use a local DTD, with
> support for  xi:include.
> 
> I received some new files from my client.  If I load one into XMLeditor,
> make a one character change, revert the change, and save the file, I
> find other changes like those below.  "-" is the file I received, "+" is
> what XMLeditor writes.
> 
> -<book id="NewBook" xmlns:xi="http://www.w3.org/2001/XInclude";>
> +<book id="NewBook">
> ...
> -    <xi:include href="chap.xml"/>
> +    <xi:include href="chap.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
> 
> Is there a way to avoid modifications like this? 
> 

--> In principle the answer is no. XMLmind XML Editor is free to arrange
non-significant whitespace, namespace prefix declarations, etc, as it
wants as long as the XML contents is well-formed.

As explained here: http://www.xmlmind.com/xmleditor/limitations.html ,
if you want to have a fine-grained control over the physical
representation of XML, then XMLmind XML Editor is clearly not the editor
of choice.

--> Now you may try to slightly change your DTD. Instead of declaring
attribute xmlns:xi for element xi:include,

---
<!ELEMENT xi:include (xi:fallback?)>
<!ATTLIST xi:include
   xmlns:xi        CDATA       #FIXED    "http://www.w3.org/2001/XInclude";
   href            CDATA       #IMPLIED
   parse           (xml|text)  "xml"
   xpointer        CDATA       #IMPLIED
   encoding        CDATA       #IMPLIED
   accept          CDATA       #IMPLIED
   accept-language CDATA       #IMPLIED
>
---

declare this attribute on top-level elements such book, chapter, etc.

After doing that, do not forget to clear the DTD cache by clicking
Options|Preferences, Advanced|Cache Data, Schema Cache|Clear Cache (more
info.
http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.guiutil.PreferencesEditorDialog.html#cacheOptions
).

If this change does not solve your problem, then the answer to your
question is definitely no.


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

Reply via email to