Subject: Re: [xsl] unknown protocol classpath|
From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx>
Date: Wed, 17 May 2006 09:27:39 -0500
^^^^ errr, don't recognize that type of doctype.Hi, I want to perform a following task: having over a few hundreds XML files, I want to remove from all of them such nodes that match a certain pattern, while preserving their original structure as much as possible.
"Typically, my XML file looks like that: <?xml version="1.0"?>
<!DOCTYPE NODE SYSTEM 'classpath:///wf/core/base/prm/resources/prm.dtd'>
I am using the following Java 1.5 code (and Xalan processor, I guess) to run it:
Then I get the following exception: java.net.MalformedURLException: unknown protocol: classpath
^^^^^ seems pretty straightforward to me. Doesn't recognize the classpath protocol. I don't either, so that's not a huge surprise. Perhaps someone on a list more focused on XML parsing and java could help you here.
Without DOCTYPE declaration in the source XML, XSL works (almost) fine. Declaring file instead of classpath gets understood also."
Well, yes. What do you expect? This isn't a XSL problem. It's an XML problem. I'm not up to snuff on some of the latest catalog stuff, but off the top of my head I've never seen classpath:/// used in a system doctype. You might want to use a parser that can handle it if it's correct.