XML includes

mhisted's Avatar


26 Jun, 2017 02:17 PM

Hi Chris,

Amidst all this dicussion of syntax, I have a question about the XML. (Can you tell I'm doing some experiment code work?)

I'm trying to use XInclude directives within states (inside <task_system_state> tags).
If I put an include directive that points to a missing file (or corrupt file) inside a state, I don't get a parser error.
Include directives right after <monkeyml> continue to give errors for missing files.

I've tried:
     <xi:include href="../XmlSharedIncludes/BaseExp.xml" parse="xml">
     <xi:include href="../XmlSharedIncludes/BaseExp.xml" parse="xml" xpointer="xpointer(//monkeyml/*)"/>
(and tried with and without the trailing slash before >)

Is this expected?


  1. Support Staff 1 Posted by Christopher Sta... on 26 Jun, 2017 02:39 PM

    Christopher Stawarz's Avatar

    Hi Mark,

    My guess is that you didn't include the "xi" namespace declaration on the monkeyml element:

    <monkeyml version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">

    Without it, xi:include elements aren't processed by the XML parsing library, and MWorks' XSLT transformation just strips them out.


  2. 2 Posted by mhisted on 26 Jun, 2017 08:39 PM

    mhisted's Avatar

    This works. Thanks, Chris.


  3. Christopher Stawarz closed this discussion on 27 Jun, 2017 01:33 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac