[xsl] [Summary] Avenues for content to enter and exit an XSLT transform?

Subject: [xsl] [Summary] Avenues for content to enter and exit an XSLT transform?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Mon, 9 Aug 2010 16:41:40 -0400
Hi Folks,

Excellent. Thank you very much James, Hermann, Dimitre, AC, and Lars.

(Remember, for now I am just considering XSLT 1.0 for now.)

Below I have updated the lists, per your inputs. Am I missing anything still?

I have a few questions:

A. James, you said: "anything that gets expanded during xml parsing (xinclude,
etc)" I thought that there are only two kinds of things that get expanded
during XML parsing: entities and XInclude elements. Are there other things?


B. James, you also said that DTDs could be an avenue for content to enter an
XSLT transform. By this do you mean placing an external entity declaration
(using DOCTYPE) at the top of the XSLT document, such as this:

<?xml version="1.0"?>
<!DOCTYPE bookstore [
    <!ENTITY discount SYSTEM "discount.xsl">
]>
<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 xmlns="http://www.w3.org/1999/xhtml";
                 version="1.0">

    <xsl:output method="html"/>

    &discount;

<xsl:stylesheet>

I listed external entities in #5 below. Are you thinking of something more
than this?


C. Dimitre, in XSLT 1.0 can global <xsl:param> elements contain "Any documents
or document-fragments"? I thought they can only contain text?

(Thanks Lars, yes, I meant <xsl:import>)


D. Hermann, does this expression actually input content into the XSLT
transform: exslt:evaluate($expr)?

------------------------------------------------------
AVENUES FOR CONTENT TO ENTER AND EXSIT XSLT TRANSFORMS
------------------------------------------------------

There are various avenues for XML content to enter an XSLT program:

1. The input XML document that is specified when the XSLT processor is
invoked.

2. The XML obtained using the document() function.

3. The content that is generated using extension functions, such as
exslt:evaluate().

4. The XML content obtained using the <xsl:import> and <xsl:include>
elements.

5. The XML/text content obtained using external entities.

6. The XML/text content obtained using XInclude elements.

7. The text content obtained from the global <xsl:param> elements.

8. The text content obtained using the system-property() function.

9. DTDs? (James, please elaborate)

The content may be obtained from local and/or network resources.


There are various avenues for content to exit an XSLT program:

1. The output document that is specified when the XSLT processor is invoked.

2. The content that is output via extension functions, such as saxon:output
and xalan:write.

3. The content that is output using <xsl:message> elements.

The content may be sent to local and/or network resources.

/Roger

Current Thread