XML and XSLT to HTML table

Hello,

I have an XML file with some information and corresponding XSLT and XSD files. I need to convert this XML to user friendly HTML table, but the problem is that XSLT contains general description and no instructions about XML to HTML conversion. Do I need to write my own parser or maybe there are existing solutions to make this conversion?

These are parts ot this files (they are too big):

XML:

<EnquiryResponse>
&#8722;
<Consumers>
&#8722;
<s>
&#8722;
<PVS>
<status>NotVerified</status>
</PVS>
&#8722;
<CAIS>
&#8722;
<Consumer>
&#8722;
<Address>
<addressCurrPrev>0</addressCurrPrev>
<buildingNbr>401</buildingNbr>
<country>FR</country>
<endDate/>
<flatNbr>56</flatNbr>
<homeTelNbr>555 77 88</homeTelNbr>
<houseNbr/>
<line1/>
<line2>ABC</line2>
<line3>DEF</line3>
<line4>GHI</line4>
<postcode>191011</postcode>
<regionCode>02</regionCode>
<startDate>19950101000000</startDate>
<type>1</type>
</Address>
&#8722;

XSL:

&#8722;
<xsl:stylesheet version="1.0">
&#8722;
<xsl:template match="/">
&#8722;
<EnquiryResponse>
&#8722;
<xsl:for-each select="/s/child::*">
&#8722;
<xsl:if test="@n != 'Consumer' and @n != 'ValidationErrors'">
&#8722;
<xsl:element name="{@n}">
<xsl:value-of select="child::node()[1]"/>
</xsl:element>
</xsl:if>
&#8722;
<xsl:if test="@n = 'ValidationErrors'">
&#8722;
<ValidationErrors>
&#8722;
<xsl:for-each select="s">
&#8722;
<s>
&#8722;
<xsl:for-each select="child::*">
&#8722;
<xsl:element name="{@n}">
<xsl:value-of select="child::node()[1]"/>
</xsl:element>
</xsl:for-each>
</s>
</xsl:for-each>
</ValidationErrors>
</xsl:if>
&#8722;
<xsl:if test="@n = 'Consumer'">
&#8722;
<Consumers>
&#8722;
<xsl:for-each select="s">
&#8722;
<s>
&#8722;
<xsl:for-each select="child::*">
&#8722;
<xsl:if test="@n = 'PVS'">
&#8722;
<PVS>
&#8722;
<xsl:for-each select="child::*">
&#8722;
<xsl:element name="{@n}">
<xsl:value-of select="child::node()[1]"/>
</xsl:element>
</xsl:for-each>
</PVS>
</xsl:if>

XSD:

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified">
&#8722;
<xs:element name="EnquiryResponse">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
&#8722;
<xs:element name="Consumers" minOccurs="1" maxOccurs="1">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
&#8722;
<xs:element name="s" maxOccurs="unbounded">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
&#8722;
<xs:element name="PVS" minOccurs="1" maxOccurs="1">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="status" minOccurs="1" maxOccurs="1" type="status">
                          </xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
&#8722;
<xs:element name="CAIS" minOccurs="0" maxOccurs="unbounded">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
&#8722;
<xs:element name="Consumer" minOccurs="1" maxOccurs="unbounded">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
&#8722;
<xs:element name="Address" minOccurs="1" maxOccurs="unbounded">
&#8722;
<xs:complexType>
&#8722;
<xs:sequence>
<xs:element name="addressCurrPrev" type="codeValue1" maxOccurs="1" minOccurs="1"/>
<xs:element name="buildingNbr" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="country" type="codeValue2" maxOccurs="1" minOccurs="1"/>
<xs:element name="endDate" maxOccurs="1" minOccurs="1" type="timeStamp"/>
<xs:element name="flatNbr" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="homeTelNbr" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="houseNbr" maxOccurs="1" minOccurs="1" type="xs:string"/>
<xs:element name="line1" maxOccurs="1" minOccurs="1" type="xs:string"/>
<xs:element name="line2" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="line3" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="line4" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="postcode" type="xs:string" maxOccurs="1" minOccurs="1"/>
<xs:element name="regionCode" type="codeValue2" maxOccurs="1" minOccurs="1"/>
<xs:element name="startDate" type="timeStamp" maxOccurs="1" minOccurs="1"/>
<xs:element name="type" type="codeValue1" maxOccurs="1" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>

Thank you.

Please check this thread this might helpful to prepare html table for your xml format

http://www.largeresource.net/forum/xml-xsl-xslt-xpath/how-to-convert-the-xml-and-xslt-into-proper-html-table/

Thank you.

Silly question - I recieved these files through third parties and can’t talk to authors. Maybe you can explain - what do these xsl instructions do? I’ve always considered xsl as a tool for working with xml. But I can’t understand what this xsl file do in this case?

Yes, i think so
Because your xsl file doesn’t seems to be preparing the html at all

So, the only way is to make a new xsl file?