Open dac514 opened 6 years ago
In schema/svg/xlink.xsd
, changing:
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
To:
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
Resolves the issue but I'm not sure this is right? I'm a bit surprised http://www.w3.org/2001/XMLSchema
would vanish?
I’d rather use the file that is guaranteed to remain available (unless someone removes it from this repo), xml.xsd. See PR #218
I think I just encountered a similar problem using Python and lxml:
Python 3.7.9 (default, Sep 6 2020, 16:32:30)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.etree
>>> lxml.etree.XMLSchema(file="htmlbook.xsd")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "src/lxml/xmlschema.pxi", line 88, in lxml.etree.XMLSchema.__init__
lxml.etree.XMLSchemaParseError: attribute use (unknown), attribute 'ref': The QName value '{http://www.w3.org/XML/1998/namespace}lang' does not resolve to a(n) attribute declaration., line 171
@gimsieke*, your suggested workaround didn’t work for me, but considering that svg/xml.xsd
is checked into the repo I changed this line
to
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
and I could load the schema file:
>>> lxml.etree.XMLSchema(file="htmlbook.xsd")
<lxml.etree.XMLSchema object at 0x10f913a70>
————— * Hallo nach Leebsch vonnem annern Sachsn! ☺️
Isn’t that exactly what I suggested in https://github.com/gimsieke/HTMLBook/commit/04ab437ea32962e84d817c5d7d776a6d2caf8f96, mei Guudsder?
Indeed you did 👍🏼 (Nu klor!)
Steps to reproduce:
Output:
Help?