XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] [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,

1) URL: http://18.220.66.208:8080/xmlvalidation/

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS