schema error

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

    schema error

    Hi all !

    My app is a asp .net page that validate a xml using a schema. But it only works (validate the xml file) when i replace the namespace "http://tempuri.org/" in xml and xsd files with a physical path of my app "c:\inetpub\www root\xml\".
    How can i use the virtual path ?

    Thank's for any help.
  • Priya Lakshminarayanan [MSFT]

    #2
    Re: schema error

    Can you post your xml and xsd?

    Thanks,
    Priya

    "fivemagic" <fivemagic@bol. com.br> wrote in message
    news:D64E1F6E-B2B0-4592-B3FB-97E491D9EF9A@mi crosoft.com...[color=blue]
    > Hi all !
    >
    > My app is a asp .net page that validate a xml using a schema. But it only[/color]
    works (validate the xml file) when i replace the namespace
    "http://tempuri.org/" in xml and xsd files with a physical path of my app
    "c:\inetpub\www root\xml\".[color=blue]
    > How can i use the virtual path ?
    >
    > Thank's for any help.[/color]


    Comment

    • five magic

      #3
      Re: schema error

      my xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <Books xmlns="http://tempuri.org/Books.xsd">
      <book>
      <name>TESTE 1</name>
      <isbn>isbn-0001</isbn>
      </book>
      <book>
      <name>TESTE 2</name>
      <isbn>isbn-0002</isbn>
      </book>
      </Books>

      my xsd:

      <?xml version="1.0"?>
      <xs:schema id="Books" targetNamespace ="http://tempuri.org/Books.xsd"
      xmlns:mstns="ht tp://tempuri.org/Books.xsd"
      xmlns="http://tempuri.org/Books.xsd"
      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="Books" msdata:IsDataSe t="true" msdata:Locale=" pt-BR"
      msdata:EnforceC onstraints="Fal se">
      <xs:complexType >
      <xs:choice maxOccurs="unbo unded">
      <xs:element name="book">
      <xs:complexType >
      <xs:sequence>
      <xs:element name="name" type="xs:string " minOccurs="0" />
      <xs:element name="isbn" type="xs:string " minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:choice>
      </xs:complexType>
      </xs:element>
      </xs:schema>



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

      Comment

      Working...