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

Re: Namespace 'http://www.w3.org/2005/xpath-functions'

Subject: Re: Namespace 'http://www.w3.org/2005/xpath-functions' does not contain any functions (was Re: XSL cant check if "File exists"?)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 29 Aug 2006 22:14:40 +0100
xpath functions namespace
When using xslt2 there is no need to declare 
xmlns:fn="http://www.w3.org/2006/xpath-functions"
(it should anyway be 2005 not 2006) it's best to not declare fn: and use
doc-available() rather than fn:doc-available() (as earlier drafts of
xslt2 used different namespaces, but all drafts define the default
function namespaces to be the correct namespace for taht draft, so if
your implementation implemnts an old draft of xslt2 then it will still
work)

IE (and other browsers such as mozilla and opera) do not support XSLT2
(and are unlikely to support them for some years one would assume)

To check if a file exists in xslt1 you can use
test="document('foo.xml')"
which will be false if the processor returns an empty node set for
missing files (they are also allowed to raisean error) or you can
escape to an extension language (in IE but not in mozilla)
msxml for example allows you to define functions in javascript, so
assuming that you are in a situation that browser security allows access
to the filesystem at all you can text in javascript (or any other ms
scripting language)

David

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-2007 All Rights Reserved.