[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: [ANN] web based XML Schema validator

  • From: Mukul Gandhi <gandhi.mukul@gmail.com>
  • To: Timothy Cook <timothywayne.cook@gmail.com>
  • Date: Mon, 6 Apr 2020 17:11:13 +0530

Re:  [ANN] web based XML Schema validator
Hi Timothy,

On Sun, Apr 5, 2020 at 1:26 PM Timothy Cook <timothywayne.cook@gmail.com> wrote:
You should support XML Catalog so that included XSDs can be found via their namespace. 

 Here's an example of how XSD validations can be done, when <xs:include> elements are present in the schema document, with the site I shared,


2) File upload 1: x1_valid.xml

<X1>
  <x>hello</x>
  <y>hello1</y>
  <z>105</z>
</X1>

or:  x1_valid.xml

<X1>
  <x>hello</x>
  <y>hello1</y>
  <z>110</z>
</X1>

3) File upload 2: x1.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
    <xs:include schemaLocation="x1_included.xsd"/>
   
    <xs:element name="X1">
       <xs:complexType>
          <xs:sequence>
             <xs:element name="x" type="xs:string"/>
             <xs:element name="y" type="xs:string"/>
             <xs:element name="z" type="restricted_Integer"/>
          </xs:sequence>
       </xs:complexType>
    </xs:element>
   
</xs:schema>

4) File upload 3: x1_included.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
    <xs:simpleType name="restricted_Integer">
       <xs:restriction base="xs:integer">
          <xs:maxInclusive value="107"/>
       </xs:restriction>
    </xs:simpleType>
   
</xs:schema>

I don't think that, this requires XML Catalog, with the site I've shared. According to XSD <xs:include> spec, the targetNamespace of included XSD document must be null (in which case, included XSD document is subject to chameleon transformation), or it must be same as that of including XSD document.



--
Regards,
Mukul Gandhi


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.