I am creating XSLT styelsheet to extract weather forecast data of different cities from XML documents. Currently, I have 3 XML files. But I am not getting idea to process multiple XML documents from one XSLT stylesheet. I want to use my one city's XML file as the main XML document of my application and call that one XSLT file for all multiple XML documents.
This is my XSLT page for melbourne:
<xsl:template match="/">
<xsl:text>Melbourne</xsl:text><br/>
<xsl:for-each select="product/forecast/area[@description='Melbourne']/forecast-period">
<xsl:value-of select="text[@type='forecast']"/>
<xsl:value-of select="text[@type='precis']"/>
<xsl:value-of select="element[@type='air_temperature_minimum']"/>,
<xsl:value-of select="element[@type='air_temperature_maximum']"/><br/>
</xsl:for-each>
</xsl:template>
I am calling this xsl page from melbourne.xml. And I want to use melbourne.xml as a main document and process other cities from here.
Can you guys give me some idea?
P.S. I am new to XML and XSLT.