Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


how to validate two XML against XSD?

From: "Rushi" <IMS.Rushikesh@-----.--->
To: NULL
Date: 12/7/2005 5:00:00 AM
Hi All,

Is it possible to Validate XML against XSD using two different XML
files.

scenario:
   There are two different XML file, one file contain element and count
information and other one contain name and other information like
color, weight etc.....
   They are linked by XLink...

Below are two files Testing-Element.xml and Testing-View.xml.

Now element file contain element information like id and count. And
linkbasefile (Testing-View.xml) contain display information.

Now I want to generate a XML Schema, which will validate for a
particular element count is less then 10 then color must be red
otherwise color must be blue.

Notice: there is no any import xml working here.

<!-- Testing-Element.xml -->
<?xml version="1.0" encoding="utf-8"?>
 <appinfo>
   <link:linkbaseRef xlink:type="simple" xlink:href="Testing-View.xml"
xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" />
 </appinfo>
<element id="ims_cat" count="15" />
<element id="ims_dog" count="8" />
<element id="ims_pig" count="10" />
<element id="ims_hen" count="20" />


<!-- Testing-View.xml -->
<?xml version="1.0" encoding="utf-8"?>
<linkbase xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" >
  <labelLink xlink:type="extended"
xlink:role="http://www.xbrl.org/2003/role/link">

    <loc xlink:type="locator" xlink:href="Testing-Element.xml#ims_cat"
xlink:label="ims_cat1_lbl" />
    <label xlink:type="resource" xlink:label="ims_cat1_lbl"
color="blue">Cats are available</label>

    <loc xlink:type="locator" xlink:href="Testing-Element.xml#ims_dog"
xlink:label="ims_dog1_lbl" />
    <label xlink:type="resource" xlink:label="ims_dog1_lbl"
xml:lang="en" color="red">Dogs are out of stock</label>
  </labelLink>
</linkbase>

Legends
<loc> element: this will link view file to element file, check
xlink:href attribute. And define the alias for element in
xlink:label="ims_cat1_lbl"
<label> element: this will link display property to alias id of
element. (ie xlink:label="ims_cat1_lbl" of <loc> must be match with
xlink:label="ims_cat1_lbl" of <label> to link them....

I am repeating my quesiton
Is it possible to Validate XML against XSD using two different XML
files. using XLink, XPointer, XPath ...or whatever u want

Thanks & Regards
Rushikesh



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