Thanks to all those who responded to my original question below. Even if the
built-in entity mappings do meet our requirements in the short term, this is
really just a specific instance of a more general question: does XSL provide
any ability to do pattern matching on anything other than elements and
attributes? Is it possible to search the *content* of an element, and to
perform manipulations based on the presence or absence of a specific string
or value (entity or otherwise)?
Again, any help will be much appreciated.
([log in to unmask])
From: Richard Light [mailto:[log in to unmask]]
Sent: Tuesday, October 24, 2000 3:14 AM
To: [log in to unmask]
Subject: Re: Processing entities
In message <[log in to unmask]>, John
E. Simpson <[log in to unmask]> writes
>At 12:41 PM 10/23/2000 -0500, Healy, Jonathan wrote:
>>I am trying to work out the details of displaying special characters
>>(greater-than and less-than signs, for example) in both print and online
>>documentation. This means we face the common problem of having to pass an
>>entity such as "<" through an XSL stylesheet without resolving the
>>entity. A more basic problem, however, is that we need to process the
>>differently depending on which stylesheet is being applied.
>>Is this possible using XSL? It seems that with an XSL stylesheet you have
>>two choices: resolve the entity, or don't. I haven't found any way to
>>transform an entity using a stylesheet (replace "<" with "\<", for
>>example). We have similar issues with other special "characters" including
>>non-breaking spaces and carriage returns (whether or not these are really
>>characters, it seems useful to view them that way).
>You might want to look at the <xsl:text> element's disable-output-escaping
>attribute, and/or the <xsl:output> element's cdata-section-elements
Also check out the built-in mapping of special characters to entity
references within the xsl:output HTML method, "at the discretion of the
XSLT processor" (Kay, p.258). This may deal with your requirements if,
as suggested above, your special characters are fairly common ones.
SGML/XML and Museum Information Consultancy
[log in to unmask]