[xsl] Line Breaks

Subject: [xsl] Line Breaks
From: "James Game" <jgame@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Sep 2005 13:42:16 +0100

I would like to separate the data listed in the BulletPoints section of my
XML (see below).  Fortunately there is an * symbol seperating each line of
data that I need.  This data is then used to fill a predertimed set of Rows
for each tag so I will need to create tags for each new line created.

If anyone could point me in the right direction it would be much


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--RT Generated XML file-->
<Unit />
<Building />
<StreetName>Priors Drive</StreetName>
<Village>Old Catton</Village>
<PostCode>NR6 7LJ</PostCode>
<BulletPoints><![CDATA[Entrance Lobby * Kitchen * Lounge * 2 Bedrooms *
Bathroom * Gas Fired Radiator Central Heating * Sealed Unit Double Glazing
* Gardens * Car Parking * Cul-de-Sac position * (Ref: 46479/MH)
<Status>Under offer</Status>


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   <xsl:output method="xml" indent="yes"/> 
    <xsl:strip-space elements="*"/>
    <xsl:output method="xml" />
    <xsl:template match = "/" >
        <DATAPACKET Version="2.0">
            <xsl:call-template name="CDSMetaData"/>
    <xsl:template name="CDSMetaData">
                <FIELD attrname="Price" fieldtype="string" WIDTH="255" /> 
                <FIELD attrname="Unit" fieldtype="string" WIDTH="255" /> 
                <FIELD attrname="Building" fieldtype="string" WIDTH="255" />

                <FIELD attrname="StreetNumber" fieldtype="string"
WIDTH="255" /> 
                <FIELD attrname="StreetName" fieldtype="string" WIDTH="255"
                <FIELD attrname="Village" fieldtype="string" WIDTH="255" /> 
                <FIELD attrname="Town" fieldtype="string" WIDTH="255" /> 
                <FIELD attrname="County" fieldtype="string" WIDTH="255" /> 
                <FIELD attrname="PostCode" fieldtype="string" WIDTH="255" />

                <FIELD attrname="BulletPoints" fieldtype="string"
WIDTH="255" /> 
                <FIELD attrname="Status" fieldtype="string" WIDTH="255" />

        <xsl:template match="property">
        <xsl:variable name="Price" select="Price" /> 
        <xsl:variable name="Unit" select="Unit" /> 
        <xsl:variable name="Building" select="Building" /> 
        <xsl:variable name="StreetNumber" select="StreetNumber" /> 
        <xsl:variable name="StreetName" select="StreetName" /> 
        <xsl:variable name="Village" select="Village" /> 
        <xsl:variable name="Town" select="Town" /> 
        <xsl:variable name="County" select="County" /> 
        <xsl:variable name="PostCode" select="PostCode" /> 
        <xsl:variable name="BulletPoints" select="BulletPoints" /> 
        <xsl:variable name="Status" select="Status" /> 
        <ROW Price="{$Price}" Unit="{$Unit}" Building="{$Building}"
StreetNumber="{$StreetNumber}" StreetName="{$StreetName}"
        Town="{$Town}" County="{$County}" PostCode="{$PostCode}"
BulletPoints="{$BulletPoints}" Status="{$Status}"  /> 

Current Thread