Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validator does not work #16

Open
lb42 opened this issue Aug 2, 2017 · 2 comments
Open

validator does not work #16

lb42 opened this issue Aug 2, 2017 · 2 comments

Comments

@lb42
Copy link

lb42 commented Aug 2, 2017

I made a few changes to the sample TEI file, so that it looked like this :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_lite.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_lite.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>Title</title>
      </titleStmt>
      <publicationStmt>
        <p>Publication information</p>
      </publicationStmt>
      <sourceDesc>
        <p>Information about the source</p>
      </sourceDesc>
    </fileDesc>
  </teiHeader>
  <text>
    <body>
      <p>Some text here.
      would be nice but what if I want to add a whole file?</p>
      <lb/><div n="foo"><p>inside a div</p></div><p>This is not valid!</p>
    </body>
  </text>
</TEI>

This is not valid against the TEI Lite schema, of course. Your validator didn't seem to mind.

@jeffreycwitt
Copy link
Owner

thanks @lb42

At the present, I don't actually think there is any schema validation going on at all.

An error only really shows if the document is not well-formed xml.

But I'll definitely put "adding a validator" on the to do list. That would be extremely useful.

@jeffreycwitt
Copy link
Owner

Note for future reference: this library might help with in browser xml schema validation:
https://github.com/kripken/xml.js

See also: http://syssgx.github.io/xml.js/ and http://blog.askjoelit.com/2014/02/xml-validation-in-client-side-javascript.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants