Overview

One of the editors for TEI/XML is LEAF-WRITER.

https://leaf-writer.leaf-vre.org/

It is described as follows:

The XML & RDF online editor of the Linked Editing Academic Framework

The GitLab repository is below.

https://gitlab.com/calincs/cwrc/leaf-writer/leaf-writer

One of the features of this tool is described as:

continuous XML validation

This validation appears to use the following API.

https://validator.services.cwrc.ca/

The library seems to be:

https://www.npmjs.com/package/@cwrc/leafwriter-validator

This time, I tried the above API.

Testing

The following page is displayed.

https://validator.services.cwrc.ca/

I tested the following with the Try It POST function.

Schema URL: https://raw.githubusercontent.com/nakamura196/test2021/main/tei_excel.rng Schema Type: RNG_XML Document Content:

<<<<???sT/xxxcETmmmhI<<Elllet/t/I--mxetet>vmmami<ex<eeootlHf/itb/xrddyneifH>obtseepsal<<<ied<>ille=det/p/s/laypdon"eDituposed>>pynhhshret<ib<uu<oDeI>>=rr=t>slttlpbrpuer"ee"tceili>lc>rs>a1ffhp>StecPieIccm.==t:tlSaucDne>0""t/mettbaefD<"hhp/t>miltsoentt:w>Ttoiicrsaett/wi>nco>mcmnpp/wtSana>ec::p.lttSt>o/utemitiSd/re<tomoaiwwli/>ntntnww.-t>ogwwociIar=..c.tnbu"ttlolfoUeecreouNTii.g>rtaF--o/mk-ccrnata8..gsthm"oo//ieu?rrd1or>ggs.nsa//d0<o<rrl"/u/ee/>prnlls>caeecemaah<esse/>eemp.//a>xxtmmrll/ntt"ee?ii>//ccuussttoomm//sscchheemmaa//rreellaaxxnngg//tteeii__aallll..rrnngg""ttyyppee==""aapppplliiccaattiioonn//xxmmll""schematypens="http://relaxng.org/ns/structure/1.0"?>

The above would not produce an error when using http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng as the schema, but should produce an error with https://raw.githubusercontent.com/nakamura196/test2021/main/tei_excel.rng which limits the available tags.

Please also refer to the following.

As a result, an error was returned as shown below. The reason that the name tag is incorrectly used was also returned.

<?vxa<<mlsw/alita<<<<<wldarlcmepaivatnioelardetuinlsetnarisneusmhitso>g>mae>niinf>2ngn/goo-a2>etT>nnri<2>>E-=el/4enIr"s<l<la/e1u/i/emts.lsncmeeu0tteoe<xl">a>ln/tttute[>euml1nsn"e]c>>nm/oaebdmnoietdn">yg[=n1"o]Ut/TpFa[-l18l]"o/?wn>eadmea[n1y]w<h/epraet;h>expectedtheelementend-tag,textorelement"choice","date","label","lb","note","orig","pb","persName","placeName","reg","ruby","seg","space"or"title"</message>

Summary

I hope this is helpful for implementing TEI/XML validation functionality.