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

RE: Get and save Stylesheet of XML Doc

Subject: RE: Get and save Stylesheet of XML Doc
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Mon, 17 Mar 2003 13:58:37 -0500
selectsinglenode processing instruction
[Ankit Jain]
> 
> Ya, its specified in the XML source but I am unable to get 
> the MSXML code for retreiving the stylesheet name. I tried 
> the SelectsingleNode("//processing-instruction") method but 
> it works inside the browser but returns an error inside the 
> MSXSML code.
> 

If the context is the document element, then this xslt expression will
get you the string with the name of the stylesheet -

<xsl:value-of
select='substring-after(processing-instruction(),"href=")'/>

There are some caveats -

1) It will not work if there are spaces around the "=".  If this could
happen, you have to write a smarter expression.
2) You will have to get rid of the quote marks surrounding the url.

You ought to be able to cause this to be done programmatically with
msxml.

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.