Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSL help

Thread Tools

XSL help

Posts: n/a

I'm attempting to display the following XML code in an HTML table usin
an XSL stylesheet. but am having a few problems.

First off an extract from the XML which was generated using Crysta


<FormattedSection SectionNumber="0">
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{VhStock.REGNO}"><ObjectName>Field22</ObjectName>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{VhStock.BODY_TYPE}"><ObjectName>Field2 5</ObjectName>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{VhStock.TRANSMISSION}"><ObjectName>Fie ld27</ObjectName>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{VhStock.PAINT}"><ObjectName>Field28</ObjectName>


**Note i am wanting to diplay the data between the<Value> </Value> tag
in the above XML. How do i select Say just the "VhStock.REGNO" field t
display in one <td> and "VhStock.Paint" in the next <td>.

Heres the stylesheet i've created to display the XML it grabs the dat
but doesnt put it in to a table or any sort of structure plese help:


<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited with XML Spy v4.2 -->
<xsl:stylesheet version="1.0" xmlnssl="">

<xsl:template match="/">
<h2>Used Vehicles</h2>

<xsl:template match="FormattedReportObjects">
<table border="0">

<xsl:template match="FormattedReportObject">

<xsl:template match="ObjectName|FormattedValue|Value">
<xsl:value-of select="text()"/>


when i view this in the browser it displays like this.
Used Vehicles
Field26DAEWOODAEWOOField22RLF462RLF462Field25SEDAN SEDANField275M5MField28GREENGREENField2906/981998-06-01T00:00:00Field304/02/052005-02-04T00:00:00Field3187,13687136.00Field33BBField3426 9269.00Field1$7,9957995.00Field2110110.00Field5LA
So its not displaying it in a table at all.. i have tried followin
many tutorials but none have helped me so far.

I have checked both the XML and XSL file in an editor and are bot

I'm just really stuck on this at the moment, mainly because none of th
tutorials really relate to an XML document structured like the on

Any help would be greatly appreciated

Posted via
View this thread:

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with XSL/XSL:FO for producing revision indicator bar in document. =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?= XML 6 05-03-2006 02:46 PM
XSL Question tp xsl:for-each and xsl:variable XML 1 05-27-2005 09:25 PM
tomcal/xsl - problems with xsl:include Klaus Friese Java 0 11-22-2004 10:17 AM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 1 09-13-2004 02:28 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 0 09-08-2004 02:11 PM