Skip to content

Error in XML document in docs #394

@bricksdont

Description

@bricksdont

In the docs about XSD validation, one of the XML documents shown is not actually valid with respect to the schema:

https://github.com/redhat-developer/vscode-xml/blob/master/docs/Validation.md#xsischemalocation

The corresponding schema has a "targetNamespace" attribute, which means it expects all elements in the XML document to be in that namespace. The XML in the docs does not have a namespace:

<foo
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://foo foo.xsd">
  <bar />
</foo>

The document should actually have a default namespace, like so:

<foo xmlns="http://foo"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://foo foo.xsd">
  <bar />
</foo>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions