Giter VIP home page Giter VIP logo

Comments (5)

AlinaOs avatar AlinaOs commented on September 21, 2024 1

@flamminger

However, I cannot use the .xsd output to validate any XML files.

If the question/problem still persists: I'm able to validate TEI-XML-documents when specifying the XSD in this way:

<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.tei-c.org/ns/1.0 path/to/document.xsd">

path/to/document.xsd needs to be the path/URL to the document.xsd (or the new filename, if it was renamed) and if the XSD is stored locally, the path should be relative to the XML document that is to be validated with the XSD.
It is important though to save the xml.xsd in the same directory as the document.xsd, otherwise all xml-prefixed attributes will be seen as invalid. Of course, both the document.xsd and the xml.xsd need to be unzipped first after downloading it from TEIgarage.

from cei2tei.

GVogeler avatar GVogeler commented on September 21, 2024

The TEIgarage conversion to xsd is correct as the schema includes attributes from the xml-namespace.

from cei2tei.

flamminger avatar flamminger commented on September 21, 2024

The TEIgarage conversion to xsd is correct as the schema includes attributes from the xml-namespace.

As far as I know, the output of the two files is normal (base definition + extension). However, I cannot use the .xsd output to validate any XML files.

from cei2tei.

flamminger avatar flamminger commented on September 21, 2024

Thanks for the answer!
I included the schema the same way. Can you validate the document.xsd and the xml.xsd?
So far, only .odd to relax has produced valid and usable schemas.

from cei2tei.

AlinaOs avatar AlinaOs commented on September 21, 2024

Oh, excuse me, I didn't realise you meant the validation of the schema itself. Actually no, I encounter the same problem in Oxygen after using TEIgarage: violation against "Unique Particle Attribution". Oxygen is still able to validate my XML documents against the schema, but always shows this error message.

In fact I wanted to write an issue about that myself, but since it seems to relate to the same problem as your issue, I will just join this issue in saying, that I have the same problem. In particular, the legalActor element seems to be problematic, as Oxygen blames it in nearly all cases. In my XSD, there are 58 UPA errors, so it is not a minor problem, if some processors refuse to validate against the schema.
I tried some simple things (e.g., changing the minOccurs of the alternate in the legalActor's elementSpec; specifying minOccurs and maxOccurs in the children of the alternate element instead of the alternate element itself; commenting the macro.specialPara out) to see, what causes the problem, but the error persisted. I'm not very familiar with the ODD syntax though, so these tests were quite naive.

Maybe the contributors could look into this, especially since the TEI probably wouldn't accept changes that aren't valid? I'd certainly be very grateful!

from cei2tei.

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.