Page 1 of 1
XPath over a collection of XHTML files - 503 error
Posted: Sat Feb 23, 2008 1:28 am
by sanderson
Using XPath 2.0 in oxygen to find all instances of a particular XPath in a collection of XHTML files
Code: Select all
collection('?recurse=yes;select=*.htm')//dd//ul
I get the following error:
I think this is due to the W3 org's limits on how often you can ping a DTD file from a particular IP address.
Is there an option to use local validation, or, cache the DTD files for validation?
BTW, just want to say again, oxygen is one of the best tools I have ever used. I'm not kissing up in hopes of help (I know y'all will help anyway), but it's so rare that I find a tool that I like to use, rather than have to use, that I want to make sure you know.
Re: XPath over a collection of XHTML files - 503 error
Posted: Mon Feb 25, 2008 2:00 pm
by sorin_ristache
Hello,
You should map the URL to a local version of the xhtml1-transitional.dtd file with an
XML catalog that contains:
Code: Select all
<system systemId="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" uri="your/path/xhtml1-transitional.dtd"/>
where
your/path/xhtml1-transitional.dtd is relative to the XML catalog file or an absolute path on your local computer. You have to add the XML catalog to the list available from menu Options -> Preferences -> XML -> XML Catalog.
Regards,
Sorin
Re: XPath over a collection of XHTML files - 503 error
Posted: Mon Feb 25, 2008 8:51 pm
by sanderson
Of course that's the right solution, thanks for turning me towards it. Oxygen comes bundled with a catalog to do just that (frameworks\xhtml\dtd\xhtmlcatalog.xml) so I added it to my XML catalog in oxygen's preferences.
I was surprised to see that there was no reference to any of the HTML dtds in the default oxygen catalog.
Steve
Re: XPath over a collection of XHTML files - 503 error
Posted: Tue Feb 26, 2008 2:52 am
by sanderson
Sadly, this didn't work. I ran into the same issue this afternoon. I can validate, but I can't run an xpath query.
Re: XPath over a collection of XHTML files - 503 error
Posted: Wed Feb 27, 2008 1:45 pm
by sorin_ristache
sanderson wrote:Oxygen comes bundled with a catalog to do just that (frameworks\xhtml\dtd\xhtmlcatalog.xml) so I added it to my XML catalog in oxygen's preferences.
I was surprised to see that there was no reference to any of the HTML dtds in the default oxygen catalog.
There is a reference to the catalog that you mentioned (frameworks\xhtml\dtd\xhtmlcatalog.xml) that maps the URL of the DTD for XHTML Transitional that you used in your XHTML documents (
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd) to a local copy of the DTD. The local copy of the DTD comes with oXygen. You can find the catalog in the XHTML document type that also comes with oXygen. Go to menu Options -> Preferences -> Document Type Association, edit the XHTML document type and in the Catalogs tab of the edit dialog you can find the catalog.
Regards,
Sorin
Re: XPath over a collection of XHTML files - 503 error
Posted: Wed Feb 27, 2008 1:52 pm
by sorin_ristache
sanderson wrote:Sadly, this didn't work. I ran into the same issue this afternoon. I can validate, but I can't run an xpath query.
The same problem was
solved on the oXygen-user mailing list. The solution is also
mentioned in the oXygen User Manual. I will repeat the solution here for other users that may have the same problem. In case of the XPath 2.0 collection() function executed by Saxon 9 (in an XSLT 2.0 transformation or in an XPath 2.0 query executed in the XPath toolbar of oXygen) the references used inside the files of the collection are resolved with an XML catalog only if a catalog enabled parser is provided to Saxon's collection resolver. You can find
in the User Manual how you should specify such a parser in oXygen.
Regards,
Sorin
Re: XPath over a collection of XHTML files - 503 error
Posted: Tue Mar 04, 2008 12:26 am
by sanderson
Thanks, works like a charm.
Why is there an oxygen mailing list and these forums? Shouldn't it be one or the other?
Re: XPath over a collection of XHTML files - 503 error
Posted: Wed Mar 05, 2008 6:17 pm
by george
They are different channels with different access and usage. On a forum you post a message and subscribe to follow only specific topics while on a mailing list you receive all the messages sent by other users. Plus each user has his/her own preference...
Best Regards,
George