XSL ConstantRefs and MacroArgRefs?
Tyler Baker
tyler at infinet.com
Fri Sep 18 08:54:15 BST 1998
For attribute value templates as well as for xsl:value-of actions the
spec states:
"It is an error to refer to a macro argument that has not been
declared."
The only unclear thing is whether or not this means that the macro
argument has to be declared in a define-macro element that is previous
to the template element in which the MacroArgRef occurs. In other
words, can you declare all of your constant and define-macro statements
at the end of the XSL stylsheet.
This is important to know because it basicly defines whether you can
parse attribute value templates within attribute values of the
stylesheet in a one-pass or a two-pass fashion. If you can assume that
all define-constant and define-macro expressions are at the beginning of
the stylesheet and follow the similiar construction rules to entities in
DTD's, then all of this can be done in one-pass. Otherwise multiple
passes are required. If this is the case, perhaps in the XSL DTD, the
stylesheet elementdecl should be changed from:
<!ELEMENT xsl:stylesheet
(xsl:import*,
(xsl:include
| xsl:id
| xsl:strip-space
| xsl:preserve-space
| xsl:define-macro
| xsl:define-attribute-set
| xsl:define-constant
| xsl:template)*)
>
to something like:
<!ELEMENT xsl:stylesheet
(xsl:import*,
(xsl:id
| xsl:strip-space
| xsl:preserve-space
| xsl:define-macro
| xsl:define-attribute-set
| xsl:define-constant)*,
(xsl:include
| xsl:template)*)
>
Tyler
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list