Problem with XML Scheme Facet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hil12345

    #1

    Problem with XML Scheme Facet

    Hello


    I Wonder if any one could give me a hand, I am trying to implement a
    numeric type restriction on an xml scheme.

    Somehow in doesn't work, while string restriction on length do work
    to me.

    I am working with a licensed version of - Microsoft Visual C# .NET

    Microsoft .Net Framework 1.1
    Is there a problem with the version?

    Thank you in advance

    Hilel



  • Martin Honnen

    #2
    Re: Problem with XML Scheme Facet



    hil12345 wrote:

    I Wonder if any one could give me a hand, I am trying to implement a
    numeric type restriction on an xml scheme.
    >
    Somehow in doesn't work,
    Can you post a minimal schema and minimal XML instance document showing
    the problem?
    What exactly does not work, do you get problems parsing/compiling the
    schema or validating the instance document?


    --

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

    Comment

    • hil12345

      #3
      Re: Problem with XML Scheme Facet

      Hello Martin

      Thanks for your quick response.

      About the problem I stated, well, all seems to work fine I mean Scheme
      validation, Generate DataSet, but when I try to test the restriction
      by a datagrid binded to the Table , it doesn't work.
      That is I somehow can key any number .

      What do you think the problem is?

      Here is the xml code I try to test


      <?xml version="1.0" encoding="utf-8" ?>
      <xs:schema id="XMLSchema2 "
      targetNamespace ="http://tempuri.org/XMLSchema2.xsd"
      elementFormDefa ult="qualified"
      xmlns="http://tempuri.org/XMLSchema2.xsd"
      xmlns:mstns="ht tp://tempuri.org/XMLSchema2.xsd"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="element1" >
      <xs:complexType >
      <xs:sequence>
      <xs:element name="aaa">
      <xs:simpleTyp e>
      <xs:restricti on base="xs:short" >
      <xs:maxExclusiv e value="100" />
      <xs:minExclusiv e value="20" />
      </xs:restriction>
      </xs:simpleType>
      </xs:element>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>


      I thanks in advance


      Hilel

      Comment

      Working...