I'm newbie in XSL and XML. I tried to make a table which contain Name and ID that can generate into html file, but when I try to run it there's no output.
Here's my xml code:
<Column Description="POS Name"/>
<Column Description="POS ID"/>
</Columns>
<Row>
<POS Name>Mall 1</POS Name>
<POS ID>00001</POS ID>
</Row>
<Row>
<POS Name>Mall 2</POS Name>
<POS ID>00002</POS ID>
</Row>
<Row>
<POS Name>Mall 3</POS Name>
<POS ID>00003</POS ID>
</Row>
And here's my xsl code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://homecredit.net/homerselect/ws/incomingPayments/dto" version="1.0">
<xsl:output method="html" indent="yes" standalone="yes" />
<xsl:template match="/">
<xsl:element name="POS">
<xsl:attribute name="lang">en</xsl:attribute>
<xsl:element name="head">
<xsl:element name="title">POS</xsl:element>
</xsl:element>
<xsl:element name="table">
<xsl:attribute name="border">1</xsl:attribute>
<xsl:element name="tr">
<xsl:element name="th">POS NAME</xsl:element>
<xsl:element name="th">POS ID</xsl:element>
</xsl:element>
<xsl:element name="tr">
<xsl:element name="td">Mall</xsl:element>
<xsl:element name="td">00001</xsl:element>
</xsl:element>
<xsl:element name="tr">
<xsl:element name="td">Mall 2</xsl:element>
<xsl:element name="td">00002</xsl:element>
</xsl:element>
<xsl:element name="tr">
<xsl:element name="td">Mall 3</xsl:element>
<xsl:element name="td">00003</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
The final output that I need is like this
POS Name POS ID Mall 00001 Mall 2 00002 Mall 3 00003