XSL Issue
Hi All,
I have the following XML in my source.
<item name='kcStage3ET'><text>text1<break/>text2<break/>text3<break/>fdssa<break
/><break/>s</text></item>
In my XSL I do the following
I do <xsl:template match="item[@name='kcStage3ET']">
<xsl:value-of-select"."/>
</xsl:template>
This returns me the value text1text2text3 in the final result.I would like to see that whenever there is a <break/> in the source as above,the <break/> tag should be inserted as is.In short my output after XSLT should result in text1<break/>text2<break/>text3,break/>.
Only if the break tags occur will my application import the final XML.
Is there like an option in value-of-select to say that select the literal value of the node?
I am not sure.
I would appreciate if anybody could help me as to how to accomplish this in XSL.
Thanks in advance,
Sreeni.
[1025 byte] By [
sreeni_78] at [2007-11-18 17:27:08]

# 4 Re: XSL Issue
Thanks for your email.This one didn't work either.I am sending the XML and Stylesheet.The XSL file runs for a few pages.
I look forward to hear from you.If you need more details let me know.
Thank You,
Sreeni.
This is is my source XML:
<?xml version='1.0' encoding='utf-8'?>
<database xmlns='http://www.lotus.com/dxl' version='6.0'
maintenanceversion='3.0'
replicaid='05256E3E007267EA'
path='CN=Scorpio/OU=SRV/O=MilkyWay/C=US!!Dev\Prototype.nsf'
title='Prototype'>
<databaseinfo
dbid='05256E3E007267EA' odsversion='43' diskspace='829440' percentused='76.2037037037037'
numberofdocuments='2'><datamodified><datetime>20040224T094444,03-05</datetime></datamodified>
<designmodified
><datetime>20040224T100818,83-05</datetime></designmodified></databaseinfo>
<document form='frmJpDef'>
<noteinfo noteid='8fa' unid='CEB50E80C02722F205256E440050C6DB'
sequence='1'>
<created><datetime>20040224T094217,87-05</datetime></created>
<modified><datetime>20040224T094444,03-05</datetime></modified>
<revised><datetime>20040224T094444,00-05</datetime></revised>
<lastaccessed><datetime>20040224T094444,03-05</datetime></lastaccessed>
<addedtofile><datetime>20040224T094444,03-05</datetime></addedtofile></noteinfo>
<updatedby><name>CN=Sreenivasan Rajagopalan/OU=SB/O=CroweChizek/C=US</name></updatedby>
<item
name='careerJobPrfET'><text>Manager</text></item>
<item
name='sbuCodeMT'><text>080</text></item>
<item name='sbuLngNameMT'><text>Enterprise
Solutions</text></item>
<item name='careerPathET'><text>Service Delivery</text></item>
<item
name='jpVersionET'><text>101</text></item>
<item name='jobSummaryET'><text>This is a sample
of summary text.</text></item>
<item name='rspnbPrmryDescr01MT'><text>Prim Responsibility
#1</text></item>
<item name='rspnbPrmryDescr02MT'><text>Prim Responsibility
#2</text></item>
<item name='rspnbOtherDescr01MT'><text>Other resp #1</text></item>
<item name='skillDescr01MT'><text>Tech Skil #1</text></item>
<item name='kcStage1ET'><text>text 1<break/><break/>text 2</text></item>
<item name='kcStage2ET'><text/></item>
<item name='kcStage3ET'><text>sdfjjfsd<break/><break/><break/>fdssa<break
/><break/>s</text></item>
<item name='kcStage4ET'><text/></item>
<item name='educationCertET'><text>cert 1<break/>cert 2<break/></text></item>
<item
name='jpKeyCT'><text>080:Service Delivery:Manager</text></item></document></database>
----End of XML----------------
-------------------------
XSL File:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dxl="http://www.lotus.com/dxl">
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="dxl:datamodified">
<xsl:apply-templates select="datetime"/>
<xsl:text></xsl:text>
</xsl:template>
<xsl:template match="dxl:designmodified">
<xsl:apply-templates select="datetime"/>
<xsl:text></xsl:text>
</xsl:template>
<xsl:template match="dxl:document">
<database xmlns='http://www.lotus.com/dxl' version='6.0'>
some XML is here with apply templates select commands.
</database>
</xsl:template>
<xsl:template match="dxl:item[@name='jpKeyCT']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='jpVersionET']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='careerJobPrfET']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='sbuLngNameMT']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='careerPathET']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='jobSummaryET']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='rspnbPrmryDescr01MT']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='rspnbOtherDescr01MT']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="dxl:item[@name='skillDescr01MT']">
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="item[@name='kcStage1ET']">
<xsl:apply-templates select="text/text()|text/break"/>
</xsl:template>
<xsl:template match="break">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>