-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support xi:include #175
Comments
Can you please attach a sample document reproducing this issue? |
Here are the two files, and also as an attachment:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="chapter_id">
<title>Sample title</title>
<para>Sample content</para>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reference.xml"/>
</chapter>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<section id="section_id">
<title>Sample title</title>
<para>Sample content</para>
</section> For the second part of my request, I have realized that it only makes sense when building the docbook, because the local references which do not have to make sense before the building; so this is only about the |
Hi,
|
@angelozerr I think this issue describes the xi:include functionality that I have mentioned in the issue related to parameter entities. I think even the second part of @ebramirez 's comment would be important: if the xml inserted with xi:includes exists and can be found at the time of validation, the plugin should be able to parse and validate the complete information set against a DTD. |
I don't know if it's easy to support xi:include. |
@ebramirez if you define <!ELEMENT xi:include (xi:fallback?) >
<!ATTLIST xi:include
xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
href CDATA #REQUIRED
parse (xml|text) "xml"
encoding CDATA #IMPLIED >
<!ELEMENT xi:fallback ANY>
<!ATTLIST xi:fallback
xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" >
<!ENTITY % local.chapter.class "| xi:include">
<!-- inside chapter or section elements -->
<!ENTITY % local.divcomponent.mix "| xi:include">
<!-- inside para, programlisting, literallayout, etc. -->
<!ENTITY % local.para.char.mix "| xi:include">
<!-- inside bookinfo, chapterinfo, etc. -->
<!ENTITY % local.info.class "| xi:include"> And you reference this file like this:
it should work better, no. It seems Oxygen suggest to do like this. |
First, it looks like inline namespaces definition does not work.
In a docbook documento, the tag
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude">
, thexi:include
element is defined in theXInclude.xsd
but is not recogniced:Optionally, it would be great that the plugin took into account the include directive and parsed and the included document.
The text was updated successfully, but these errors were encountered: