The HTML5 project indicates (at least for the time being) that the about:legacy-compat can be used for documents that rely on an XML-compatible doctype (which <!DOCTYPE html> not).
So, I have a package of HTML5-validating XML files that start with:
<!DOCTYPE html SYSTEM "about:legacy-compat">
Unfortunately, when I use such an XHTML5 document with any XSLT processor, such as Xalan or Saxon, they naturally try to resolve the (unsolvable) URI.
Is there a way to get them to ignore the URI or fake it under the hood? An attempt to solve this occurs at the beginning of these documents, therefore, for example, Saxon -dtd:off has no effect.
Edit: low-level approach sed -n '2,$p' <htmlfile> | otherapp sed -n '2,$p' <htmlfile> | otherapp , unfortunately, only works until I start using the XPath document() function to load another XHTML5 file.
Edit 2: I played with XML directories and made them work with both Saxon and Xalan. However, I always get
java.net.MalformedURLException: unknown protocol: about
Well, this is not surprising, but how can I get around this? The URL should never be parsed, just throw it away.
source share