You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Prapti Sen <ps...@adomo.com> on 2003/10/02 20:47:49 UTC

XInclude

I have Xercer-2.5.0 . I am not sure how to use XInclude. 
When I parse the Test_Suite.xml I do not get the contents of the included test.xml. Someone please help.

I am using XInclude in a XML file (Test_Suite.xml) . The contents of Test_Suite.xml are:


Test_Suite.xml
----------------------
<?xml version="1.0"?>
<Test_Suite>
	<foo xmlns:xi="http://www.w3.org/2001/XInclude">
	  <xi:include href="test.xml"/>
	  <test>some</test>
	</foo> 
</Test_Suite>


test.xml
------------
<?xml version="1.0"?>
<test>
 	<test1>hi</test1>
 	<test2>hello</test2>
</test>


As far as I understand, the resultant Test_Suite.xml, after resolving inclusions, actually has the following contents:

<?xml version="1.0"?>
<Test_Suite>
	<foo xmlns:xi="http://www.w3.org/2001/XInclude"> 
	<test>
 		<test1>hi</test1>
	 	<test2>hello</test2>
	</test>
	<test>some</test>
	</foo> 
</Test_Suite>


But on parsing Test_Suite.xml , it does not give me the contents of test.xml.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Xerces for Pocket PC

Posted by Shital Joshi <sh...@mfgsys.com>.
Hello,

Is there any special Xerces edition for Pocket PC J9 application? 

Thanks,
-Shital Joshi
MFG Systems


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: XInclude

Posted by Michael Glavassevich <mr...@apache.org>.
Hi,

In order to use XInclude in Xerces you need to override the default parser
configuration. It must be set to
org.apache.xerces.parsers.XIncludeParserConfiguration. There are a couple
ways of doing this. They're described in the FAQ [1].

Hope that helps.

[1] http://xml.apache.org/xerces2-j/faq-xni.html#override-default-config

On Thu, 2 Oct 2003, Prapti Sen wrote:

> I have Xercer-2.5.0 . I am not sure how to use XInclude.
> When I parse the Test_Suite.xml I do not get the contents of the included test.xml. Someone please help.
>
> I am using XInclude in a XML file (Test_Suite.xml) . The contents of Test_Suite.xml are:
>
>
> Test_Suite.xml
> ----------------------
> <?xml version="1.0"?>
> <Test_Suite>
> 	<foo xmlns:xi="http://www.w3.org/2001/XInclude">
> 	  <xi:include href="test.xml"/>
> 	  <test>some</test>
> 	</foo>
> </Test_Suite>
>
>
> test.xml
> ------------
> <?xml version="1.0"?>
> <test>
>  	<test1>hi</test1>
>  	<test2>hello</test2>
> </test>
>
>
> As far as I understand, the resultant Test_Suite.xml, after resolving inclusions, actually has the following contents:
>
> <?xml version="1.0"?>
> <Test_Suite>
> 	<foo xmlns:xi="http://www.w3.org/2001/XInclude">
> 	<test>
>  		<test1>hi</test1>
> 	 	<test2>hello</test2>
> 	</test>
> 	<test>some</test>
> 	</foo>
> </Test_Suite>
>
>
> But on parsing Test_Suite.xml , it does not give me the contents of test.xml.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>

-- 
--------------------
Michael Glavassevich
mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org