GEOS
GEOS copied to clipboard
XML Inclusions
Describe the issue For now inclusions are handled by an ad hoc xml element. There is need of a special treatment to use included files.
Proposed cleanup XML Inclusions (XInclude) is a W3C specification that defines a way to include XML fragments from different sources into a single document. We could use this official mechanism instead of an ad hoc one. What do you think ?
Additional context n.a.
This is do-able, but I have a few concerns:
- Our xml interpreter (pugixml) does not support xi:include natively, so we would have to do this all ourselves
- The syntax of xi:include isn't as user friendly as our current implementation
- Validating the included xml files is a bit harder using xinclude, as they aren't required to conform to the parent schema
This is do-able, but I have a few concerns:
- Our xml interpreter (pugixml) does not support xi:include natively, so we would have to do this all ourselves
I just saw that: https://github.com/zeux/pugixml/issues/338 It seems weird but yes, we would have to to it
- The syntax of xi:include isn't as user friendly as our current implementation
aside from the xi:
not sure it is very different
<Included>
<File name="./FieldCaseTutorial3_base.xml" />
</Included>
vs
<xi:include href="./FieldCaseTutorial3_base.xml"/>
- Validating the included xml files is a bit harder using xinclude, as they aren't required to conform to the parent schema
I don't understand this concern. Do you have an example ?
For me a schema makes a whole. There is not parent or child schemas. Using xinclude in xml files is just a way to break down the complexity of a large document.