RE: problem with unc relative path
doc-available() returns true() or false(), it never returns empty. Saxon delegates URI resolution to the Java runtime. I think Java VMs are not usually very comfortable with URIs based on UNC filenames. It's worth calling base-uri() to see what is the base URI of the node that the relative document URI is being resolved against. You can of course do the resolution yourself in your own URIResolver if this proves necessary. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Rick Roen [mailto:Rick@xxxxxxxxxxxxxxxxxx] > Sent: 26 June 2006 12:15 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: problem with unc relative path > > Win XP sp2 - XSLT 2.0 - FOP trunk using Saxon 8.7.? > > I'm having some difficulty resolving the relative file path > for a document in my transformation when I run from a unc file path. > > The problem happens when I run the program from an unmapped > folder on a remote server, i.e. "\\lvsserver0\lvsapps". The > program, and the document I am trying to load are both in the > same folder, but it seems unable to resolve the relative file path. > > When I run the same program + file combination from a local > drive, or from the same server's mapped drive, i.e. > "z:\lvsapps", no problem, the document loads properly. > > How do I get this to resolve properly on an unmapped drive? > > See below for details. > > Thanks for any suggestions, > > Rick > > _______________________________________________ > > Xml fragment: > <letter-file>Cor_CreditLetter.xml</letter-file> > > > XSL fragment > > <xsl:if test="empty( doc-available( letter-file ) )"> > <xsl:message select="concat( '==== Unable to locate the > credit letter file: ', letter-file, ' . See your > administrator to resolve.' )" > terminate="yes" /> > </xsl:if> > <xsl:for-each select="doc(letter-file)"> > <xsl:apply-templates /> > </xsl:for-each> > > Error: > > SEVERE: Exception > net.sf.saxon.trans.DynamicError: Failed to load document > Cor_CreditLetter.xml > at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:167) > at > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:114) > at org.apache.fop.cli.Main.startFOP(Main.java:159) > at org.apache.fop.cli.Main.main(Main.java:190) > > --------- > > ; SystemID: file:////Lvsserver0/lvsapps/Cor_CreditLetter.xsl; > Line#: 195; > Column#: -1 > net.sf.saxon.trans.DynamicError: Failed to load document > Cor_CreditLetter.xml > at > net.sf.saxon.expr.ComputedExpression.dynamicError(ComputedExpr > ession.java:62 > 5)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format