Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Inclusions #3073

Open
untereiner opened this issue Apr 10, 2024 · 3 comments
Open

XML Inclusions #3073

untereiner opened this issue Apr 10, 2024 · 3 comments
Assignees
Labels
type: cleanup / refactor Non-functional change (NFC) type: new A new issue has been created and requires attention

Comments

@untereiner
Copy link
Contributor

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.

@untereiner untereiner added type: cleanup / refactor Non-functional change (NFC) type: new A new issue has been created and requires attention labels Apr 10, 2024
@cssherman
Copy link
Contributor

This is do-able, but I have a few concerns:

  1. Our xml interpreter (pugixml) does not support xi:include natively, so we would have to do this all ourselves
  2. The syntax of xi:include isn't as user friendly as our current implementation
  3. Validating the included xml files is a bit harder using xinclude, as they aren't required to conform to the parent schema

@untereiner
Copy link
Contributor Author

This is do-able, but I have a few concerns:

  1. Our xml interpreter (pugixml) does not support xi:include natively, so we would have to do this all ourselves

I just saw that: zeux/pugixml#338
It seems weird but yes, we would have to to it

  1. 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"/> 
  1. 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 ?

@untereiner
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup / refactor Non-functional change (NFC) type: new A new issue has been created and requires attention
Projects
None yet
Development

No branches or pull requests

3 participants