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

Re: XSLT and XML in the same document

Subject: Re: XSLT and XML in the same document
From: "M. David Peterson" <m.david@xxxxxxxxxxxxx>
Date: Sun, 27 May 2007 15:08:17 -0600
Re:  XSLT and XML in the same document
On Sun, 27 May 2007 03:02:54 -0600, Michael Kay <mike@xxxxxxxxxxxx> wrote:

If you mean, can you put the stylesheet inside the source document you are
trying to transform, the answer is yes (see "Embedded Stylesheets" in the
spec), but not all XSLT processors support it.

Coming from the other direction, you can embed your XML data into your XML-based XSLT file, and then access it via the document() function (e.g. document('')/*/ext:my-embedded-data would gain you access to the node-set inside of your XSLT file who's parent element was ext:my-embedded-data**)


The above will work on any XSLT 1.0 processor.

Except Opera.

But looking at the bright side, I've been including in my prayers each and every morning and night that the Opera God's will send some document() function love to this Opera loving heart of mine. Maybe I have a bad connection? Don't know. Maybe I'll try another service provider and see if maybe that is indeed the problem. In the mean time you'll have to make do with one of the other *standards conforming* XSLT processors on the market. Last time I checked there were several to choose from. ;-)

** requires you declare a separate namespace with the desired extension prefix.

--
/M:D

M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 | http://dev.aol.com/blog/3155


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.