This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: mixed content styling problem
In message <43C2F98D8414D411865A00508BC22AB906416A@odin.interxtechnology
.com>, Bill dehOra <wdehora@cromwellmedia.co.uk> 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@light.demon.co.uk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list