Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Validating XML against Schema

From: Murali Maddali <maddalimurali@-----.--->
To: NULL
Date: 7/2/2004 12:23:00 PM
Hi Priscilla,

Thank you for your response, first of all my appologies for posting the
wrong xml and schema files. I was trying to make a temperorary xml and
schema files, so that it would be easy to post on the forum.

1. You need to prefix AccountUpdate with "tmpGlobals:" - otherwise the
namespace declaration does nothing.

I am not sure what you mean by this, but I tried to prefix AccountUpdate
with tmpGlobals and also tried to specify a default namespace, but
nothing helped. still the file is invalid.

2. Your xsi:schemaLocation attribute should say .../tmpGlobals instead
of ..../globals. The namespaces have to match exactly.

I tried with this change but this is of not much help.

3. The namespace specified in your xs:import statement in account.xsd
must match the target namespace of the schema you are importing. So, it
must use www.temp.com instead of www.talgov.com.

This was a copy/paste/replace error that I did during the post, all my
files refer to same namespace.


If you (any one else) want to take a look at the xml and schema files,
please mail me personally, I would send them to you. I don't want the
post to get too long.

Things that confuse me most:
Here I am using my actual XML header, so please don't get confused, with
my post. The actual header looks like this.

1) cisGlobals.xsd.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.talgov.com/cisGlobals" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:cisGlobals="http://www.talgov.com/cisGlobals" 
elementFormDefault="unqualified">

2) accountInformationUpdate.xsd
<xs:schema elementFormDefault="unqualified"
attributeFormDefault="unqualified" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:cisGlobals="http://www.talgov.com/cisGlobals">
	<xs:import namespace="http://www.talgov.com/cisGlobals" 
	schemaLocation="cisGlobals.xsd"/>
	<xs:element name="AccountUpdate">

3) cis.xml
<AccountUpdate xmlns:cisGlobals="http://www.talgov.com/cisGlobals" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.talgov.com/cisGlobals
accountInformationUpdate.xsd">


Thank you for all your help and replies, and once again sorry for the
confusion.

murali.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent