node-libxml-xsd icon indicating copy to clipboard operation
node-libxml-xsd copied to clipboard

Cannot read XLIFF schema

Open timaschew opened this issue 8 years ago • 1 comments

I try to read the XLIFF schema, here is the XSD http://docs.oasis-open.org/xliff/v1.2/cs02/xliff-core-1.2-strict.xsd (saved here as a gist)

I get this (output and) error, when I try to read it via schema = xsd.parse(schemaString)


I/O warning : failed to load external entity "http://www.w3.org/2001/xml.xsd"
Entity: line 1661: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
Entity: line 1676: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does not resolve to a(n) attribute declaration.
Entity: line 1770: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
Entity: line 1879: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does not resolve to a(n) attribute declaration.
Entity: line 1925: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does not resolve to a(n) attribute declaration.
Entity: line 1964: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
Entity: line 1987: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
Entity: line 2013: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
Entity: line 2053: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration.
Entity: line 2056: element attribute: Schemas parser error : attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}space' does not resolve to a(n) attribute declaration.
Error: Invalid XSD schema
    at Error (native)
    at Object.exports.parse (/Users/anton/dev/o/html-templates/node_modules/libxml-xsd/index.js:56:37)
    at repl:1:14
    at REPLServer.defaultEval (repl.js:252:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:417:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:210:10)

timaschew avatar Mar 14 '16 11:03 timaschew

Parsing was successfull with this library https://github.com/nikku/node-xsd-schema-validator but it's java

timaschew avatar Mar 14 '16 12:03 timaschew