[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Document function and DTD

Subject: Re: Document function and DTD
From: jingjun long <longjingjun@xxxxxxxxx>
Date: Thu, 27 Dec 2007 17:09:57 +0800
Re:  Document function and DTD
Colin Paul Adams,

Thanks you.

I am using Saxon 8.9b.

The catalog files should be configed correctly since it can find the DTD using PUBLICID for the source XML file (not src_doc in XSLT).

It seems to me the catalog file is NOT searched using document function in XSLT. It try to find a DTD file in the same folder where src.xml is.

DocType definition in XML file:
<!DOCTYPE mybook PUBLIC "-//atom//DTD MYBOOK-REV2//EN" "mybook.dtd">

Error:
FODC0005: java.io.FileNotFoundException:
C:\data\src\mybook.dtd (System can not find the file.)

C:\data\src folder is the folder where src.xml is.

Thanks

Jingjun





Colin Paul Adams ei:
"jingjun" == jingjun long <longjingjun@xxxxxxxxx> writes:

jingjun> hi there, I am using document function to read multiple jingjun> XML document as the source. I have a question and wonder jingjun> if you have experience this before.

jingjun> In the XSLT, I say:

    jingjun> <xsl:variable name="src_doc"
    jingjun> select="document('src.xml')"/>

jingjun> If there is no DocType definition in src.xml, it is ok.

    jingjun> In my case, there is a DocType definition in src.xml. The
    jingjun> DTD is not in the same folder where src.xml is. I use
    jingjun> catalog file to locate the DTD file. In this case, I get
    jingjun> "can not find DTD file" error when I run the xslt.

    jingjun> My question is, is there any way to set catalog resolver
    jingjun> for document function?

No. It ought to use the same catalogs as for the principal source
document.

Which XSLT processor are you using? Have you tried turning on catalog
debugging (if it has such a  feature) to make sure that the catalog is
being searched properly?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.