Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Can't get XSLT debugger to use local DTDs (get HTTP 503 to w3.org)
Can't get XSLT debugger to use local DTDs (get HTTP 503 to w3.org) [message #542572] Fri, 25 June 2010 11:11 Go to next message
Dominic Jacobssen is currently offline Dominic JacobssenFriend
Messages: 2
Registered: June 2010
Junior Member
I'm desperately trying to run the WTP 3.2 (XSLT 1.1, I believe) XSL debugger under Helios (on Ubuntu Lucid 64 bit).

Now, I already know that the XSLT debugger doesn't honour the XML Catalogs bundled with the WTP; this is mentioned here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=282741

The recommended way, as mentioned in the bug above, is documented here:

http:// xml.apache.org/commons/components/resolver/resolver-article. html

... which comes down to adding a "xml.catalog.files" entry to the system properties, pointing to the catalog files.

Now, the catalog files in the WTP are all packed up in jars, but it looks like the w3c-dtd-xhtml package installs these nicely (that is, "sudo apt-get install w3c-dtd-xhtml").

However, I can't work out how to add these as system arguments.

Adding them to eclipse.ini doesn't seem to work, and in any case seems to be a little bit silly (I don't want all of eclipse to use them, just the XSLT transformer). I've tried adding these lines (but, like I said, it doesn't work):

Quote:

-Dxml.catalog.files=/usr/share/xml/xhtml/schema/dtd/1.0/cata log.xml;/usr/share/xml/xhtml/schema/dtd/1.1/catalog.xml;/usr /share/xml/xhtml/schema/dtd/basic/catalog.xml;/usr/share/xml /xhtml/schema/dtd/catalog.xml;/usr/share/xml/entities/xhtml/ catalog.xml
-Dxml.catalog.verbosity=99
-Dxml.catalog.prefer=public
-Dxml.catalog.staticCatalog=true
-Dxml.catalog.allowPI=true



I've also tried playing around with the "Classpath" entry in the XSLT Debug Configuration (that is, Debug Congurations->XSL->XSLT->Classpath). I've tried doing:

Quote:

Advanced->Add Variable String->Variables->system_property->Configure->xml.catalog.files



... but I get the impression that this list is just a way of exposing the available variables for defining further variables, rather than setting existing variables themselves.

In other words, I end up with infinite variations of the form:

Quote:

xml.config.files=...
${system_property:xml.config.files}=...
${system_property}:xml.config.files=...
... etc



but I suspect these need to used like this:

Quote:

-Dmyvar=${system_property:user.dir}/foo.dat



So I'm right out of ideas, and I'm tearing my hair out.

Can any kind soul please prod me in the right direction?

Thanks!

D
Re: Can't get XSLT debugger to use local DTDs (get HTTP 503 to w3.org) [message #542966 is a reply to message #542572] Mon, 28 June 2010 03:26 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 176
Registered: July 2009
Senior Member
>
> However, I can't work out how to add these as system arguments.
>
> Adding them to eclipse.ini doesn't seem to work, and in any case seems
> to be a little bit silly (I don't want all of eclipse to use them, just
> the XSLT transformer). I've tried adding these lines (but, like I said,
> it doesn't work):
>

I'm sorry to have to admit I've not used the XSLT debugger, but assume
there is a "launch configuration" for it? If so, that's normally where
system properties are specified for the jre running the debugging session.
Re: Can't get XSLT debugger to use local DTDs (get HTTP 503 to w3.org) [message #542996 is a reply to message #542966] Mon, 28 June 2010 07:40 Go to previous messageGo to next message
Dominic Jacobssen is currently offline Dominic JacobssenFriend
Messages: 2
Registered: June 2010
Junior Member
Hi there; thanks for your answer.

Yes, that's what I tried (probably unsuccessfully) to document in the second half of my post.

The problem is that whereas "normal" Java processes (like running a Java program under debug mode) have a very easy accessible VM configuration panel, in "Arguments->VM arguments", the XSLT debug configuration looks different.

The "Main" tab contains the XML input file, the transformation pipeline and the transformation parameters.

The "Ouput" tab contains options for the naming and location of the output XML file;

The "Processor" tab contains options for selecting which XSLT processor to use (for example, default JDK versus Xalan). There are "Attributes" and "Output Properties" tabs, but these appear to be directives to the processors themselves (e.g. "indent", "encoding", "omit-xml-declaration");

The "JRE" tab contains the ability to choose the JRE. I can't see anywhere here to add VM arguments;

The "Classpath" tab is the most promising, in that it has an "Advanced" tab that looks like it might allow key-value pairs of VM args, but as I documented in my original post, I'm hopelessly lost in regards to the syntax of these, and have been reduced to trying all combinations, to no avail;

The "Source" tab contains source lookup paths for step debugging, and the "Common" looks like it's the same as for "classic" Java debugging (for example, "appear in Run/Debug menus", "Allocate Console").

I've even been considering modifying local DNS to allow us to spoof w3.org and allow the DTD files to be "retrieved". But that's the solution of last resort!

Cheers,

D

Re: Can't get XSLT debugger to use local DTDs (get HTTP 503 to w3.org) [message #543893 is a reply to message #542572] Thu, 01 July 2010 00:29 Go to previous message
David Carver is currently offline David CarverFriend
Messages: 174
Registered: July 2009
Senior Member
The launching and debugging uses the apache XML Catalog resolver.jar file, and this needs a Catalog properties file where it can look for DTD or Schemas that need to be resolved. This has to be on the classpath for the launch configuration. How you set this property file up is documented here

http://xml.apache.org/commons/components/resolver/resolver-a rticle.html

Add it to the classpath, and this should find the files.

Unfortunately, we currently can't access the existing XML Catalog that is stored within eclipse.

If this doesn't work, please open a bug report against the WTP Source Editing/wst.xsl component.

Dave
Previous Topic:Dynamic Web Project setup with new Deployment Assembly page
Next Topic:XPAth search
Goto Forum:
  


Current Time: Sat Apr 20 03:22:46 GMT 2024

Powered by FUDForum. Page generated in 0.02750 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top