From: Fabrice DESRE - FT.BD/FTRD/DMI/GRI (fabrice.desre@francetelecom.com)
Date: 22/08/2001 - 06:24
"Roux, Olivier (FIDI)" wrote:
>
> Il y a déjà eu une discussion à ce sujet : il est IMPOSSIBLE de définir des
> includes dynamiquement avec les parsers "normaux" (Xalan entre autres). Ce
> n'est tout simplement pas implémenté.
> La seule solution est de réaliser l'include dynamique par un servlet ou un
> truc du même genre avant de parser l'XSL...
Bonjour,
Cette difficulté ne provient pas d'une limitation des processeurs XSLT
mais du
simple fait qu'ils respectent la norme. On peut ainsi lire en [1] :
<quote>
7.6.2 Attribute Value Templates
In an attribute value that is interpreted as an attribute
value template,
such as an attribute of a literal result element, an
expression
can be used by surrounding the expression with curly braces
({}).
The attribute value template is instantiated by replacing
the
expression together with surrounding curly braces by the
result of
evaluating the expression and converting the resulting
object to a
string as if by a call to the string function. Curly braces
are not
recognized in an attribute value in an XSLT stylesheet
unless the
attribute is specifically stated to be one that is
interpreted as an
attribute value template; in an element syntax summary, the
value of
such attributes is surrounded by curly braces.
NOTE: Not all attributes are interpreted as attribute
value templates.
Attributes whose value is an expression or pattern,
attributes of
top-level elements and attributes that refer to named
XSLT objects are
not interpreted as attribute value templates. In
addition, xmlns attributes
are not interpreted as attribute value templates; it
would not be
conformant with the XML Namespaces Recommendation to
do this.
</quote>
La note indique clairement que les top-level éléments tels que
<xsl:include/> ne peuvent pas
utiliser de tels attributs.
Cordialement,
Fabrice
[1] http://www.w3.org/TR/xslt#dt-attribute-value-template
--
Fabrice Desré - France Telecom R&D/DMI/GRI
Tel: +(33) 2 96 05 31 43
Fax: +(33) 2 96 05 32 86
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|