Hi Shirish ,


[EMAIL PROTECTED] wrote:
Hi All,
I am fairly new bee as far as xml schemas are concerned.Following problem has troubled me for last 2 days.I have searched all user archives and web resources but no use.So finally i am sending this to xerces users list.

I have an xml configuration file(Databse configuration etc) which I am validating usign xml schema.
But now I am trying to split the configuration file in different files(mainly static content and not static content like Database config info)so that while deploying the application, the administrator has to deal with little configuration info.

To split the xml file,I am using entity declaration.But some how, the xerces parser does seem to throw exception when it comes across the DOCTYpe declaration 
  


What is the exception you are getting , can you post  it . I tried using jaxp and it works for me .
I have set following properties .

        spf.setNamespaceAware(true);
        spf.setValidating(true);
        SAXParser saxParser = spf.newSAXParser();
        saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
        saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",xsdFile);

Hope this helps.


Regards
venu
Here is sample xml file.

<?xml version="1.0"?>
<!DOCTYPE root[	<!ENTITY	INCLUDE_DB_CONFIG 	SYSTEM "dbconfig.xml">]>

<root xmlns="http://www.ubs.com/MyApp/MyConfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ubs.com/MyApp/MyConfig
../../../CEFS/batch/config/MyConfigfile.xsd">
	
	&INCLUDE_DB_CONFIG;
	
	<perl-node-configuration>
		<perlNode>xxx</perlNode>
	</perl-node-configuration>
	
	<application-defaults>
		<defaultLanguage>en</defaultLanguage>
		<defaultCurrency>EUR</defaultCurrency>
		<exchangeScheduleRefreshPeriod>1800000</exchangeScheduleRefreshPeriod>
	</application-defaults>

	<!-- perl -->
	
	<!-- defaults -->
	
</root>
  


So can anybody tell me what I am doing wrong?

And mainly is it possible to use the entities like this with XML document constrained by XML Schema?I am not sure if the processor is expanding the entity before validating.

Any help will be appreciated.

regards,
Shirish

Shirish Sakhare
Application Developer
(CEFS PROJECT)
(CEFS) Corporate Employee Financial Services

UBS AG
Stauffacherstrasse 41
P.O. Box, CH-8004 Zürich
Tel: +41-1-235 56 31
Fax: +41-1-235 54 21
Personal Mail Id:[EMAIL PROTECTED]
-------------------------------------------- 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

Reply via email to