0

As I understand it, using XSL to generate documents has two parts:

1) An XML document which references an XSL stylesheet 2) An XSL stylesheet

Let's say that I want to generate a document using XSL, and then send it to a friend. Without relying on the stylesheet being available on the internet, and without including the stylesheet as a separate file, how can I send him the document as a single file and have it just work?

I suppose ideally I'd like to send the "transformed" output, not the XML or XSL itself. Can this be done?

Colen
  • 13,428
  • 21
  • 78
  • 107

4 Answers4

4

You have a two options:

  1. Do as you suggest and send your friend the transformed document (the output of the xml/xsl transformation)
  2. Embed the xml/xsl in a single file as per the xslt spec (link text)

If you're not sure if your friend will be able to process the xml/xsl file himself, then you are really only left with option 1

Chris Gow
  • 7,514
  • 4
  • 23
  • 18
2

You need an xslt processor. This takes xml and xsl files and process them into their output (typically html, text, or xml). Some common ones are:

You can then take the output html, text, or xml file, and pass that on to your friend.

Stobor
  • 44,246
  • 6
  • 66
  • 69
0

possibly... You could try viewing the page in a web browser, and viewing source. Otherwise, your're probably using the wrong format.

Nico Burns
  • 16,639
  • 10
  • 40
  • 54
0

XSLT can be run from a remote workstation via a web browser, but that requires the stylesheet (.xsl) to be available on the internet.

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502