xml file and schema reference

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

    #1

    xml file and schema reference



    I'm using the .NET IDE and I have an XML file that I'm trying to
    validate against an XML schema on my local drive.

    the noNamespaceSche maLocation attribute has been modified to what I
    think is the proper syntax for the path on my local Windows drive
    (changed the directory delimeters from "\" to "/" also??).

    I have no web service on my machine.

    The XML file:
    --------------
    <?xml version="1.0" encoding="utf-8"?>
    <DataSet xmlns="http://tempuri.org/CAMPS_SOTW63.xs d"
    xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespace SchemaLocation= "file:///D:/Development/DB/XML/2004_06_14/
    CAMPS_SOTW63.xs d">
    <AIRCRAFT_STATU S>
    <DHDT>08-APR-2004 12:00:00</DHDT>
    <TAIL_FLEET>917 11S</TAIL_FLEET>
    </AIRCRAFT_STATUS >
    </DataSet>
    ---------------

    Within the .net environment I choose XML-->Create Schema.

    Since I've tried this several times, .NET has inc'd the numbering, this
    time it created an .xsd file named CAMPS_SOTW63.xs d:
    ----------------

    <?xml version="1.0"?>
    <xs:schema id="DataSet"
    targetNamespace ="http://tempuri.org/CAMPS_SOTW63.xs d"
    xmlns:mstns="ht tp://tempuri.org/CAMPS_SOTW63.xs d"
    xmlns="http://tempuri.org/CAMPS_SOTW63.xs d"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
    attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
    <xs:element name="DataSet" msdata:IsDataSe t="true"
    msdata:EnforceC onstraints="Fal se">
    <xs:complexType >
    <xs:choice maxOccurs="unbo unded">
    <xs:element name="AIRCRAFT_ STATUS">
    <xs:complexType >
    <xs:sequence>
    <xs:element name="DHDT" type="xs:string " minOccurs="0" />
    <xs:element name="TAIL_FLEE T" type="xs:string "
    minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    ---------------------

    Much oblidged for any and all help.




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

    #2
    Re: xml file and schema reference

    What's the question? Schema and instance look fine at first glance.

    ht
    --
    Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
    Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
    Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
    URL: http://www.ltg.ed.ac.uk/~ht/
    [mail really from me _always_ has this .sig -- mail without it is forged spam]

    Comment

    • Wayne Shook

      #3
      Re: xml file and schema reference


      Thanks for the reply Harry, it WAS OK. I downloaded the free copy of
      XMLSpy and that was the only one of four tools that accepted the
      external schema. It was a matter of resolving the external file, not
      the format of the XML itself.

      I never really "for sure" nailed down why .NET and JDeveloper would not
      find my external schema. I noticed on a working XML application that
      .NET works if you add the schema file to the dependency (GAC) list.
      When that is done, .NET "resolves" the schema file. Unfortunately,
      these files are stand-alone and not part of any project.

      Oblidged that you took the time to look over the XML.

      Wayne


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

      Comment

      Working...