Page 1 of 1

Validating in Eclipse plugin

Posted: Wed Jul 23, 2003 8:36 pm
by neilhart
I have the following dtd description

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"../catalog/docbookx.dtd" [<!ELEMENT xi:include (xi:fallback?)>
<!ATTLIST xi:include xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'>
<!ATTLIST xi:include href CDATA #REQUIRED>
<!ATTLIST xi:include parse (xml|text) 'xml'>
<!ATTLIST xi:include encoding CDATA #IMPLIED>
<!ELEMENT xi:fallback ANY>
<!ATTLIST xi:fallback xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'>
]>


When I place and include like:
<section>
<section>
<xi:include href="cvsDirectory.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</section>
</section>

the last </section> has a validation error. Is there any why to not get
this error.

thanks

Posted: Thu Jul 24, 2003 1:12 am
by george
Hi,

You just defined a few more elements, you cannot make a valid document unless you alter the section element declaration to allow xi:include.

You may think that the xi:include should be replaced with the actual content but Oxygen does not currently support XInclude therefore it is treated as any other element with no special semantics.

You can use an external entity instead. You can look at an article on our site that describes exactly this http://www.oxygenxml.com/articles/Worki ... uments.pdf.

Best Regards,
George

Posted: Tue Mar 01, 2005 12:19 pm
by nsilberz
Does oXygen now support xi:include?

Posted: Tue Mar 01, 2005 5:52 pm
by george
Hi,

Yes, see the samples/docbook/sampleXInclude.xml for a ready to use sample file. Also make sure you turn the XInclude support on, it is off by default. To do that go to the oXygen preferences and enable the XInclude support on the XML -- XML Parser Options page.

Best Regards,
George