This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: RE : translation string to element
- From: Peter Davis <pdavis152 at attbi dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 17 Apr 2002 02:34:47 -0700
- Subject: Re: RE : [xsl] translation string to element
- References: <000301c1e5f1$6c74d680$1f2aa58b@KHARTES>
- Reply-to: xsl-list at lists dot mulberrytech dot com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alright, fair enough. Next question: exactly what determines that "fine"
becomes "<tag>fine</tag>"?
Also, you cannot access entities directly. In XML, the entity "&mood;" is
defined in the XML file's DTD and is expanded to the value of the entity by
the XML parser. So as far as XSLT is concerned, "&mood;" is not special; the
XSLT only sees the value of "&mood;", whatever that might be. If you simply
want to replace "&mood;" with "not fine", then this is done in the DTD, and
the XSLT doesn't have to do anything.
On Wednesday 17 April 2002 02:22, Nicolas Mazziotta wrote:
> That's not exactly that:
> Consider the following .xml file:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <root>
> I am fine
> </root>
>
> I want to create a templatethat would produce the following output:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <root>
> I am <tag>fine</tag>
> </root>
>
> or
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <root>
> I am &mood;
> </root>
>
> or
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <root>
> I am not fine
> </root>
- --
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8vUG6NSZCJx7tYycRAsFdAKCX9zMv0lkkaRdPt/fF0S9r3JKb+ACeIGhK
ceoTjH+4dUSTuqNKugYNSGQ=
=RjxQ
-----END PGP SIGNATURE-----
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list