Re: [XSLT] Sélectionner les attributs d'un espace de noms particulier

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.french.tech
Organization Dyomedea (http://dyomedea.com)
Message-ID <[email protected]>
Le mercredi 08 novembre 2006 à 21:19 +0100, Stephane Bortzmeyer a
écrit :
> On Wed, Nov 08, 2006 at 10:30:54AM +0100,
>  Eric van der Vlist <[email protected]> wrote 
>  a message of 104 lines which said:
> 
> > Est-ce que vous avez bien tenu compte du fait que l'espace de noms
> > par défaut ne s'appliqua pas aux attributs?
> 
> Si ! C'est bien cela. C'est bien embêtant comme règle. Si je mets un
> préfixe à chaque attribut, ce template "matche" bien :
> 
>   <xsl:template match="@xhtml:*|xhtml:*">
> 
> mais évidemment, je ne vais pas mettre un préfixe à chaque attribut. 
Non, d'autant plus que cela ne serait plus du XHTML valide!

> > il faut écrire match="xhtml:*/@*[namespace-uri()='']" !
> 
> Mais cela va attraper tous les attributs sans namespace, non, y
> compris ceux qui ne sont pas dans des élements <xhtml:XXX> ?

match="@*[namespace-uri()='']" matcherait effectivement tout les
attributs sans espaces de noms, mais
match="xhtml:*/@*[namespace-uri()='']" ne match que ceux qui sont dans
des éléments XHTML...

Cordialement,

Eric van der Vlist

-- 
GPG-PGP: 2A528005
Carnet web :
           http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBFUkItDvn+ZCpSgAURAg+qAJ0Xt7ZnaYdluBwT3CszMyr7mZyyhgCgiqe/
ti9aFew9Z37MKvj68xcNuac=
=RzON
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.