Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6377299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:51:13+00:00 2026-05-25T01:51:13+00:00

The HTML5 draft specifies (at the moment at least), that the URI about:legacy-compat can

  • 0

The HTML5 draft specifies (at the moment at least), that the URI about:legacy-compat can be used for documents, that rely on an XML conforming doctype (which <!DOCTYPE html> isn’t).

So I happen to have a bundle 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 like Xalan or Saxon, they naturally try to resolve the (unresolvable) URI.

Is there any way to bring them into ignoring the URI or faux-resolving it under the hood? The try to resolve it happens early in these documents, so for example Saxon’s -dtd:off switch has no effect here.

Edit: The low-level approach sed -n '2,$p' <htmlfile> | otherapp unfortunately only works until I start to use the document() XPath function to load another XHTML5 file.

Edit 2: I played around with XML catalogs and got them to work with both Saxon and Xalan. However, then I get always a

java.net.MalformedURLException: unknown protocol: about

Well, it’s not surprising, but how can I circumvent this? The URL should never be parsed, just thrown away.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:51:13+00:00Added an answer on May 25, 2026 at 1:51 am

    Put this Java file into $somepath/foo/about/

    package foo.about;
    
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.StringBufferInputStream;
    import java.net.URL;
    import java.net.URLConnection;
    
    public class Handler extends java.net.URLStreamHandler {
    
    @Override
    protected URLConnection openConnection(URL url) throws IOException  {               
        URLConnection res = new URLConnection(url) {
    
            @Override
            public void connect() throws IOException {
                connected = true;
            }
            @Override
            public InputStream getInputStream() throws IOException {
                return new StringBufferInputStream("<!ELEMENT html ANY>");
            }
        };
        return res;
     }
    }
    

    Now go in $somepath and compile it:

    javac foo/about/Handler.java
    

    Add the following arguments to the JVM when calling Saxon:

    -Djava.protocol.handler.pkgs=foo -cp"$somepath"
    

    Here is a modified shell script script (for *nix system but it it very similar for Windows):

    #!/bin/sh
    
    exec java -Djava.protocol.handler.pkgs=foo -classpath /usr/share/java/saxonb.jar:"$somepath" net.sf.saxon.Transform "$@"
    

    You may want to adapt using your local saxonb-xslt script if it doesn’t work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a AS3 socket server that can handshake with html5 websockets.
HTML5 draft contains an API called EventSource to stream data (notifications) trough javascript using
In the W3C working draft for HTML5 here's a line I find confusing: http://www.w3.org/TR/html5/introduction.html#html-vs-xhtml
Should the HTML5 database be used to store any form of private information? Say
I've asked question about JavaScript memory and HTML5 LocalStorage limitations on smartphones , however
What are the key differences between HTML4 and HTML5 draft ? Please keep the
Is there a freely available jQuery plugin that changes placeholder behavior to match HTML5
HTML5 will be next super star. So~~~How to using new idea to implement AJAX
HTML5 and CSS3 support among major browsers are not consistent. What are the good
HTML5 Anyway to include a submit button directly into a input type=text? For instance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.