I am using XSLT 1.0 and have below sample code:
In my XSLT, I have got a param which has my XML path
<xsl:param name="sitespath"/>
I know I can load it as document and then further get the values accordingly, like below
<xsl:variable name="siteInfoPath" select="document($sitespath)/sitedata/region/site/language"/>
The above siteInfoPath XSLT varaible is loading the document with /sitedata/region/site/language data, however now I want to take PublishDate, below is the XML sample format
<?xml version="1.0"?>
<sitedata>
<resources>
<WorldwideSites>Worldwide sites</WorldwideSites>
<PublishedDate>10/3/2011 9:12:35 AM</PublishedDate>
</resources>
<region code="global" title="Global">
<site defaultLanguage="en" id="tcm:0-233-1" url="/english" countryCode="" title="" order="1">
<language code="en" pubId="tcm:0-233-1" pubPath="\english" Culture="en-GB" ShortDate="dd MMM yy" ShortDateShortDay="ddd dd MMM yy" ShortDateTime="dd MMM yy, HH:mm" LongDate="d MMMM, yyyy" LongDateTime="d MMMM, yyyy, HH:mm" LongDateExtendedShortDay="ddd dd MMM, yyyy" LongDateExtended="dddd, d MMMM, yyyy" LongDateExtendedTime="dddd, d MMMM, yyyy, HH:mm" MonthYear="MMMM, yyyy" OmniturePrefix="ek global:en:" OmnitureReportSuite="emirnewglobalenglish,emirnewibems" OmnitureDevReportSuite="emirglobalendev" sifr="Y" localTitle="" url="/english" mobileRedirect="true" flightStatusAlert="true" GoLiveDate="20071110" targetHost="http://fly1.com" hpSearchF="Yes" hpHotelsCars="Yes" hpMYB="Yes" hpOLCI="Yes" hpFStatus="Yes" hpServicesF="Yes">English</language>
</site>
Do I need to use another variable and need to load document like this
<xsl:variable name="siteInfoDate" select="document($sitespath)/sitedata/resources/PublishedDate"/>
I don't want to load same xml again...please suggest!!