Hi Eric
If using XSLT 2.0 is possible for you (so <xsl:stylesheet version="2.0" ...) you could use xpath-default-namespace="urn:isbn:1-931666-22-9" in your root element and your original stylesheet should work. Otherwise you will need to be explicit with your namespaces because in XSLT 1.0 the default namespace of a stylesheet only applies to the result document. Jeni Tennison has written about this: http://www.jenitennison.com/blog/node/36.
Cheers
Richard
Richard Lehane | Project Officer, Digital Archives
State Records Authority of New South Wales
Department of Finance and Services
Tel: 02 8247 8636 Fax: 02 8247 8626
Email: [log in to unmask]
Post: PO Box 516, Kingswood, NSW 2747, AUSTRALIA
Web: www.records.nsw.gov.au
50 years State Records NSW | 1961-2011
documenting our past, informing our future
-----Original Message-----
From: Encoded Archival Description List [mailto:[log in to unmask]] On Behalf Of Eric Lease Morgan
Sent: Tuesday, 8 November 2011 6:46 AM
To: [log in to unmask]
Subject: Re: none of my value-of statements work
Thank you for the prompt replies, and the consensus here as well as on XML4Lib is for me to first enhance the namespace declaration in my style sheet's root to look something like this:
xmlns:e="urn:isbn:1-931666-22-9"
Second, I need to enhance all my XPath statements to include the enhancement, something like this:
<xsl:value-of match="e:ead/e:eadheader/e:filedesc/e:titlestmt/e:titleproper"/>
While I understand this technique, it is laborious because there are a lot of XPath expressions in my stylesheet. But more importantly, by enhancing my style sheet in this say I loose my ability to apply it against the EADs which validate against the DTD and do not have the urn:isbn name space. I will need two style sheets. Correct?
BTW, my original EAD and style sheet are here:
* http://zoia.library.nd.edu/tmp/stc/stc.xml
* http://zoia.library.nd.edu/tmp/stc/ead2html.xsl
--
Eric "Making Really Slow Progress Today" Morgan
*********************************************************************
This email and any files transmitted with it are intended solely for
the use of the addressee(s) and may contain information that is
confidential or subject to legal privilege. If you receive this email
and you are not the addressee (or responsible for delivery of the
email to the addressee), please note that any copying, distribution
or use of this email is prohibited and as such, please disregard the
contents of the email, delete the email and notify the sender
immediately.
State Records advises that this email and any attached files should
be scanned to detect viruses and accepts no liability for loss or
damage (whether caused by negligence or not) resulting from the use
of any attached files.
*********************************************************************
|