Validating in Eclipse plugin

Are you missing a feature? Request its implementation here.
neilhart

Validating in Eclipse plugin

Post 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
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
nsilberz
Posts: 9
Joined: Tue Mar 01, 2005 12:15 pm

Post by nsilberz »

Does oXygen now support xi:include?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply