Try running the doc() function with the same URI. You may then get some
information (in the form of an error message) as to why the document is not
available. The trouble about doc-available() is you only get a true or false
result.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic(_at_)newflyer(_dot_)com]
Sent: 08 July 2009 19:33
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] doc-available() URIs not found
Running Saxon from the command line has also given me the
same results. All returned 'false'.
Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries
(204) 224-1251 ext. 7004
mario_madunic(_at_)newflyer(_dot_)com
-----Original Message-----
From: Mario Madunic [mailto:Mario_Madunic(_at_)newflyer(_dot_)com]
Sent: Wednesday, July 08, 2009 1:15 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] doc-available() URIs not found
Hi,
I've been having issues with doc-available(), it is not able
to find any files that I specify, whether via variable or
hardcoded. First here are my specs
Java 1.6.0_14
ANT 1.7.1
Saxon 9.1.0.7J (copied into the ant/lib) XP SP3
I'm using the XSLT task within ANT.
doc-available() returns false and have used various versions
of a URI to see what the results would be and all return
'false'. Below the signature are all the instances I've used
(some should in effect return false as I'm pretty sure some
of not syntactically correct).
I've tested the following in Oxygen 10 and received a result of 'true'
doc-available('file:/D:/workDirs/transforms/doneTest/svg/tps01
0021a.svg')
And when I remove the .svg extension I get a result of 'false'
doc-available('file:/D:/workDirs/transforms/doneTest/svg/tps010021a')
Also when I run it as the task the below statements take
around 3 minutes to run.
I'm going to try and run it via the command line outside of
the ANT task and see what happens, but until then if anyone
has any ideas or solutions to this, I would be very grateful.
Also am I doing off base as to the usage of doc-available().
This is the first time I had this kind of issue with
doc-available(), doc(), and collection() in ANT - I've tried
all three to no end. So I guess, is this an issue with ANT or
even Java instead of Saxon.
(The files path is
'D:/workDirs/transforms/doneTest/svg/tps010021a.svg', just
being thorough)
Thanks
Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries
(204) 224-1251 ext. 7004
mario_madunic(_at_)newflyer(_dot_)com
-------------------------------------------------------------------
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:///D:/workDirs/transforms/doneTest
/svg/tps010021a.svg')" /> -
file:///D:/workDirs/transforms/doneTest/svg/tps010021a.svg</xs
l:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file://D:/workDirs/transforms/doneTest/
svg/tps010021a.svg')" /> -
file://D:/workDirs/transforms/doneTest/svg/tps010021a.svg</xsl
:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:/D:/workDirs/transforms/doneTest/s
vg/tps010021a.svg')" /> -
file:/D:/workDirs/transforms/doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('D:/workDirs/transforms/doneTest/svg/tps
010021a.svg')" /> -
D:/workDirs/transforms/doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:///d:/workDirs/transforms/doneTest
/svg/tps010021a.svg')" /> -
file:///d:/workDirs/transforms/doneTest/svg/tps010021a.svg</xs
l:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file://d:/workDirs/transforms/doneTest/
svg/tps010021a.svg')" /> -
file://d:/workDirs/transforms/doneTest/svg/tps010021a.svg</xsl
:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:/d:/workDirs/transforms/doneTest/s
vg/tps010021a.svg')" /> -
file:/d:/workDirs/transforms/doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('d:/workDirs/transforms/doneTest/svg/tps
010021a.svg')" /> -
d:/workDirs/transforms/doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:\\\D:\workDirs\transforms\doneTest
\svg\tps010021a.svg')" /> -
file:\\\D:\workDirs\transforms\doneTest\svg\tps010021a.svg</xs
l:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:\\D:\workDirs\transforms\doneTest\
svg\tps010021a.svg')" /> -
file:\\D:\workDirs\transforms\doneTest\svg\tps010021a.svg</xsl
:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:\D:\workDirs\transforms\doneTest\s
vg\tps010021a.svg')" /> -
file:\D:\workDirs\transforms\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('D:\workDirs\transforms\doneTest\svg\tps
010021a.svg')" /> -
D:\workDirs\transforms\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:\\\d:\workDirs\transforms\doneTest
\svg\tps010021a.svg')" /> -
file:\\\d:\workDirs\transforms\doneTest\svg\tps010021a.svg</xs
l:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:\\d:\workDirs\transforms\doneTest\
svg\tps010021a.svg')" /> -
file:\\d:\workDirs\transforms\doneTest\svg\tps010021a.svg</xsl
:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('file:\d:\workDirs\transforms\doneTest\s
vg\tps010021a.svg')" /> -
file:\d:\workDirs\transforms\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('d:\workDirs\transforms\doneTest\svg\tps
010021a.svg')" /> -
d:\workDirs\transforms\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('doneTest/svg/tps010021a.svg')" /> -
doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('../doneTest/svg/tps010021a.svg')" /> -
../doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('../../doneTest/svg/tps010021a.svg')"
/> - ../../doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('../../../doneTest/svg/tps010021a.svg')"
/> - ../../../doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('../../../../doneTest/svg/tps010021a.svg
')" /> - ../../../../doneTest/svg/tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('doneTest\svg\tps010021a.svg')" /> -
doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('..\doneTest\svg\tps010021a.svg')" /> -
..\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('..\..\doneTest\svg\tps010021a.svg')"
/> - ..\..\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('..\..\..\doneTest\svg\tps010021a.svg')"
/> - ..\..\..\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
<xsl:message><xsl:value-of
select="doc-available('..\..\..\..\doneTest\svg\tps010021a.svg
')" /> - ..\..\..\..\doneTest\svg\tps010021a.svg</xsl:message>
<xsl:message />
--------------------------------------------------------------------
Please consider the environment before printing this e-mail.
CONFIDENTIALITY STATEMENT: This communication (and any and
all information or material transmitted with this
communication) is confidential, may be privileged and is
intended only for the use of the intended recipient. If you
are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard
copy, copying or other use of this communication, information
or material is strictly prohibited and may be illegal. If you
received this communication in error or if it is forwarded to
you without the express authorization of New Flyer, please
notify us immediately by telephone or by return email and
permanently delete the communication, information and
material from any computer, disk drive, diskette or other
storage device or media. Thank you.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--------------------------------------------------------------------
Please consider the environment before printing this e-mail.
CONFIDENTIALITY STATEMENT: This communication (and any and
all information or material transmitted with this
communication) is confidential, may be privileged and is
intended only for the use of the intended recipient. If you
are not the intended recipient, any review, retransmission,
circulation, distribution, reproduction, conversion to hard
copy, copying or other use of this communication, information
or material is strictly prohibited and may be illegal. If you
received this communication in error or if it is forwarded to
you without the express authorization of New Flyer, please
notify us immediately by telephone or by return email and
permanently delete the communication, information and
material from any computer, disk drive, diskette or other
storage device or media. Thank you.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--