Coder Social home page Coder Social logo

XSD invalid about ids HOT 6 CLOSED

NickNisbet avatar NickNisbet commented on July 24, 2024
XSD invalid

from ids.

Comments (6)

JBreelKubus avatar JBreelKubus commented on July 24, 2024 1

Currently we're working on an IDS implementation and we're working on the XML generation part. We wanted to validate the result against this file: https://github.com/buildingSMART/IDS/blob/master/Development/ids.xsd

Now we're getting the same errors as mentioned in the original comment when using Microsoft development tools.
src-resolve.4.2: Error resolving component 'xs:occurs'. It was detected that 'xs:occurs' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'virtual://server/schema.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xs:occurs' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'virtual://server/schema.xsd'.

What it seems like to us is that the syntax for XML schema's (XSD) is being used in the resulting XML files. The xs:occurs and xs:restriction are meant to be used in XSD files. The namespace of xs(http://www.w3.org/2001/XMLSchema) is thus what confuses the validation tools.

Would it be possible to look into this on your end?

from ids.

CBenghi avatar CBenghi commented on July 24, 2024 1

See also #113.

The problem has been found both on Java and .NET implementation.
There's a concern that the initial hope that tooling would be helped by using the standard xml types does not yield the expected benefits.

Maybe it's worth specifying our on data types to resolve the issue.

from ids.

berlotti avatar berlotti commented on July 24, 2024

Wat version of XMLSpy are you using?
It works fine in mine...

from ids.

NickNisbet avatar NickNisbet commented on July 24, 2024

from ids.

berlotti avatar berlotti commented on July 24, 2024

The IDS schema combines two namespaces.
This allows IDS to use existing well established standards like the XSD restrictions (enumerations, patterns, minInclusive, etc..) instead of mimicking them with something IDS specific.

idsXML files therefore need to make sure their tags/elements have the correct namespace.
As you will see in the examples it combines ids:whatever with xs:things.
This combination of elements with different namespaces is a somewhat advanced use of XML that not all validators can understand.

Your error on minOccurs/maxOccurs seems to say that the correct namespace was not used in the XML file.
Happy to help (and also very curious :-)). Freel free to email me the file if that is possible.

from ids.

JBreelKubus avatar JBreelKubus commented on July 24, 2024

The issue was already with the XSD file in this repository itself. Before we were trying to validate an XML file it was already giving these errors.

It's indeed possible to use the XSD elements in an XML file itself. The XSD restrictions under my understanding are meant for validating an XML file not for adding into the XML file itself. Some tools will support this and others won't, which is the issue we're running into. The XSD tool from Microsoft (XML Schema Definition, Xsd.exe) is giving these errors just on the XSD file alone. Some online validation websites also seem to be unable to handle the XSD file.

This complicates both the implementation and validation of the XML files on our end.

from ids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.