On 09/03/2015 12:20 AM, Leif Halvard Silli (russisk.no) wrote:
Hi.

Because of XXE’s support of XInclude, I thought I could open my
handcoded compound document (which includes lots of subdocuments via
<xi:xinclude … />) in XXE.

XXE will happily process any conforming <xi:xinclude/> element, whether hand-coded or created using XXE. That's why standards are made for.



But when I do, I am told that the xinclude
elements are illegal in the context.

The <xi:xinclude/> elements cannot be illegal in any context, unless:

* XInclude support is not available in XXE for the type of document being opened.

Example: you opened an XHTML document containing <xi:xinclude/> elements in a version older than 6.2 (January 26, 2015). See http://www.xmlmind.com/xmleditor/changes.html#v6.2.0

OR

* You type the <xi:xinclude/> element in XXE's XML source view. (For XXE, <xi:xinclude/> elements only exist at document load time and at document save time.)




The way to fix the problem seems to be to create the compound document -
the main document - inside XXE. Which means I must recreate that
document by use of XXE.

No please don't do this! You would waste your time.

Please send me privately a sample document of yours so I can tell you what really happens.

It's probably something very simple to solve such as forgetting to specify the XInclude namespace. Example:

    <xi:include href="../_tutorial/create_doc/index.html"
                xpointer="create_doc"
                xmlns:xi="http://www.w3.org/2001/XInclude"; />

where xmlns:xi="http://www.w3.org/2001/XInclude"; would be missing.




Fair enough. But isn’t there a way to «bless» a hand-coded compound
document so that XXE will handle it as expected?

No, because you describe an issue which should not happen.



(For the record, I created some minimal documents - by hand and by XXE,
and the only thing that differed in these documents was - it seems -
that one was hand coded and and the other was made by XXE. And no mater
how identical I made those docuemnts, XXE would only accept thet one
that was autored inside XXE.)


"And no mater how identical I made those documents, XXE would only accept that one that was authored inside XXE" is very hard to believe.

Please send me privately a sample document of yours so I can tell you what really happens.



--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to