Resolving which version of an XML Schema to use for XML documents with a version attribute
问题 I have to write some code to handle reading and validating XML documents that use a version attribute in their root element to declare a version number, like this: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <Junk xmlns="urn:com:initech:tps" xmlns:xsi="http://www3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:com:initech.tps:schemas/foo/Junk.xsd" VersionAttribute="2.0"> There are a bunch of nested schemas, my code has an org.w3c.dom.ls.LsResourceResolver to figure out what