Re: mixed content styling problem

Subject: Re: mixed content styling problem
From: Richard Light <richard@xxxxxxxxxxxxxxxxx>
Date: Thu, 25 May 2000 13:52:45 +0100
In message <43C2F98D8414D411865A00508BC22AB906416A@xxxxxxxxxxxxxxxxxxxxx
.com>, Bill dehOra <wdehora@xxxxxxxxxxxxxxxxxxx> writes
>Hi,
>
>I hope someone can assist me with my current situation. I am having
>difficulty styling the emphasis tags within #PCDATA of mixed content. I
>basically need to be able to apply further templates to a tree fragment
>which is not in itself a node. 

>Here is the XML component
>
><A>
><B TYPE="PUB">The following information should be seen in <E1>italics</E1>
>and this is some extra information which occurs after the emphasis tags.
><C><D>Here is some additional information</D></C></B>
><B TYPE="NONPUB">This information is not for publication at this stage</B>
><B TYPE="NONPUBTOO">Neither is this information.</B>
></A>

Apologies for the simple-minded answer if I've missed some subtle point
in your question ...

However, if I have understood your requirement correctly, can't you just
do this:

<xsl:template match="E1"><I><xsl:apply-templates/></I></xsl:template>

??  The default actions called up by apply-templates will cause the text
nodes within your E1 element to be output, without any further action on
your part, and they will be nicely trapped within the literal I element
you have output.

Richard.

Richard Light
SGML/XML and Museum Information Consultancy
richard@xxxxxxxxxxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread