|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Formatting an element at the end of PCDATA
At 21:30 10.09.99 +0200, you wrote:
>
> I am having trouble with finding the proper XSL coding for IE5 for the
> following XML code:
> .............<JRNL>Journal of
> physics<CITY>Amsterdam</CITY></JRNL>.............
> while the element CITY can also occur elsewhere outside JRNL.
>
> I want to get as output:
> ...........Journal of physics [Amsterdam]..................
> while for the CITY element outside JRNL no square brackets are allowed.
>
> The XSL coding to start with for the element CITY outside JRNL is:
> <xsl:template match="JRNL">
> <xsl:apply-templates />
> </xsl:template>
> <xsl:template match="CITY">
> <xsl:apply-templates />
> </xsl:template>
>
Try something like this:
<xsl:template match="JRNL">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="JRNL//CITY">
[<xsl:apply-templates />]
</xsl:template>
>
> Does someone know how to change this XSL coding to get the wanted result? I
> don't seem to be able to find the proper 'contexting'. Keep in mind the
> inside element JRNL also element like ITAL, BOLD, etc. may occur.
>
> Regards,
> Cees Dekker
> ILOX
> Netherlands
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








