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

Re: Output XML doc with XSL doc name in comment

Subject: Re: Output XML doc with XSL doc name in comment
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 08 May 2002 17:56:41 -0400
display xml doc
Mike,

At 01:58 PM 5/8/2002, you wrote:
> It isn't obvious that the XML it is processing has a name. Both the
> source XML and the stylesheet might come from standard input
> stream, or
> from a stream of sax events or....

Dear David C.,
Even given what you have said, isn't it true that I must call up a
file name whether it be from the command line, or with xsl:import or
xsl:include, etc.?

No ... David describes situations where, for example, your XML could be pipelined in from some other application, etc. That is, while (this year) the vast majority of XSLT processes may be invoked using file names as handles on XML documents in a file system, this doesn't always have to be the case, so the processor shouldn't assume it.


It's no more a rule that input should always come from a file than that output should always be written to a file. Output could go straight into display, never have a file name. Maybe that display has some editing capability. Maybe you then hit a button and the new document you just wrote is transformed somehow. No file.

Actually, XML/XSLT is OS-neutral, and some OSes don't even have "files" (so XML uses URIs, building on top of the SGML notion of "system identifiers").

  And if so, then why not capture those ?.xsl names
for the comment either at their location or globally? Again, SAXON
has the name/path anyway.

This is exactly why Mike K. usually says "pass it in as a parameter". This is easy enough to do with a shell script (which is what you're doing with your NoteTab thingie, isn't it?).


???
<saxon:systemID select="document('')"/>

Someone else who's used it can confirm this, but my guess is this'll give you, in Saxon, the filename of the stylesheet (if it has one).


Cheers,
Wendell


====================================================================== 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.