At 99/01/12 20:29 +0200, Oren Ben-Kiki wrote:
>For all those who are fighting against the restriction that XSL processors
>will emit only valid XML, here's a way out which works at least for XT. I'd
>be very interested to know whether it works in other processors and whether
>it is a valid trick (it probably isn't).
>
>Suppose you have a rule which goes:
>
><xsl:template match="...">
><xsl:comment> -->
>Whatever I damn please, including <, &!!!
><!-- </xsl:comment>
></xsl:template>
>
>Running this through XT will emit:
>
><!-- -->
>Whatever I damn please, including <, &!!!
><!-- -->
Section 2.7.5 reads (in part):
========8<-------
It is an error if if the result of instantiating the content of the
xsl:comment contains the string -- or ends with -. An XSL processor may
signal the error; if it does not signal the error, it must recover by
inserting a space after any occurrence of - that is followed by another -.
========8<-------
So, when repaired, XT could not be relied upon to give the above behaviour.
>Isn't this fun?
Sorry to spoil the party.
....... Ken
--
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Training: http://www.CraneSoftwrights.com/s/schedule.htm
Resources: http://www.CraneSoftwrights.com/s/resources.htm
Shareware: http://www.CraneSoftwrights.com/s/shareware.htm
Next XSL Training (see training link): WWW8 - 1999-05-11
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- GOTCHA!
- Oren Ben-Kiki - Tue, 12 Jan 1999 20:29:22 +0200
- G. Ken Holman - Tue, 12 Jan 1999 14:58:42 -0500 <=
- James Clark - Wed, 13 Jan 1999 10:17:30 +0700
- <Possible follow-ups>
- Oren Ben-Kiki - Wed, 13 Jan 1999 11:25:28 +0200
|
|