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

Re: XML Embedded in XSL Embedded in XML

Subject: Re: XML Embedded in XSL Embedded in XML
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Feb 2004 13:07:32 -0500
xml embedded xsl
Eric,

In the XPath data model, each node has a "Base URI" associated with it, which you could use for this purpose if you could only get access to it. Unfortunately there's no function in XPath 1.0 that will give it to you.

There may be hacks or tricks you could use, or honest extension functions, to get this value, depending on your processor. But the easiest and most portable way to get the value into your stylesheet is simply to pass the file name in as a string parameter, at runtime.

Ask again if you can't figure out how to do this.

Oh, and, strictly speaking you're not allowed to use "xml" as an element name (though not all processors enforce this restriction).

Cheers,
Wendell

At 12:48 PM 2/19/2004, you wrote:
I seem to have a catch-22 here that my mind can't get around, as I try to convert from hard-coded html to XSL. I've got an XML file with a ref to an XSL, eg.

<?xml-stylesheet type="text/xsl" href="Test.xsl"?>
<xml> ... </xml>

The stylesheet has all the usual stuff, but also this attribute:

<xml id="Info" src="h:\temp\dccase.xml" />

My problem is that I *want* the src to be is the very XML document that called the XSL in the first place. How would I do that?


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.