Re: Bug in VS XML Editor?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris Lovett (clovett-at-microsoft-dot-com)
Date: 09/27/04

  • Next message: zbcong: "timeout to ntd winform"
    Date: Mon, 27 Sep 2004 00:27:27 -0700
    
    

    I get the following (correct) errors in Visual Studio 2005:

    Error 1 Tag was not closed. C:\Documents and Settings\clovett\My
    Documents\Visual Studio\Projects\XMLFile1.xml 2 2
    Error 2 Expecting end tag </mySchema:MyElement>. C:\Documents and
    Settings\clovett\My Documents\Visual Studio\Projects\XMLFile1.xml 4 5
    Warning 3 The 'Something' element is not declared. C:\Documents and
    Settings\clovett\My Documents\Visual Studio\Projects\XMLFile1.xml 3 4

    The validation error is just a warning, and if you change the following in
    your schema, this warning goes away.

    <xs:any processContents="skip" />

    Chris.

    "Arturo" <arturo-g@lycos.com> wrote in message
    news:e1a45d36.0408120608.32a58919@posting.google.com...
    > Hello everybody. Can anybody could confirm if this is a bug???
    >
    > If I create the schema:
    > -----------------------
    > <?xml version="1.0" encoding="utf-8" ?>
    > <xs:schema id="MySchema"
    > targetNamespace="http://tempuri.org/MySchema.xsd"
    > elementFormDefault="qualified"
    > xmlns="http://tempuri.org/MySchema.xsd"
    > xmlns:mstns="http://tempuri.org/MySchema.xsd"
    > xmlns:xs="http://www.w3.org/2001/XMLSchema">
    > <xs:element name="MyElement">
    > <xs:complexType>
    > <xs:sequence>
    > <xs:any />
    > </xs:sequence>
    > </xs:complexType>
    > </xs:element>
    > </xs:schema>
    >
    > And the file
    > ------------
    > <?xml version="1.0" encoding="utf-8" ?>
    > <mySchema:MyElement xmlns:mySchema="http://tempuri.org/MySchema.xsd">
    > <Something>This is something and should be allowed</Something>
    > </MyElement>
    >
    > Visual Studio says (in the XML editor) "The active schema does not
    > support the element 'Something'."
    >
    > Is this a bug? What I am doing wrong?
    >
    >
    > Thanks!


  • Next message: zbcong: "timeout to ntd winform"

    Relevant Pages

    • Re: GEDOM as a database format
      ... Their software & schema can remap the source elementto ... But I'll have their schema and I can evaluate their context. ... I'm simply saying that XML provides a way to tag data, ...
      (soc.genealogy.computing)
    • Re: An incorrect assumption over radix_tree_tag_get()
      ... Someone is seeing is a bug with an apparently corrupt radix tree tag chain ... reason for the confidence displayed in the documenation that this cannot ...
      (Linux-Kernel)
    • RE: Flatfile Issue
      ... Your second comment is correct regarding parsing of a flat file into XML. ... In essence I did the following to have the flexibility to alter the schema ... > DetailRecord) you'll probably need to use some kind of a tag to allow the ...
      (microsoft.public.biztalk.general)
    • Re: Interchange pipeline failure
      ... And I think you would be right, Greg. ... I hadn't realised a tag was required. ... Create a single schema including the header and trailer, ... send out and receive the Xml document again on another receive port. ...
      (microsoft.public.biztalk.general)
    • Re: Interchange pipeline failure
      ... The header probably has 1 record and a tag identifier of HH, ... The document schema has 1 record but no tag identifier, ... This schema does not know that there is a trailer record ... It tries to parse the trailer record as a document record and fails. ...
      (microsoft.public.biztalk.general)