Hi there,
I have Slabtron and Expat installed along with PHP (last version i believe)
when i apply XSL on XML, it outputs every single node and chid node from xml, but all i want to output is 3 fields from that XML .. here are my XML, XSL, PHP code..
any help is greatly appreciated!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$xml=
<row>
<App_ID>18</App_ID>
<User_ID>10</User_ID>
<Note_ID>0</Note_ID>
<Resume_Title>win test</Resume_Title>
<Resume_FName>Alexei</Resume_FName>
<WorkStatus>Authorized to work in the locations selected</WorkStatus>
<Country_Name>Canada</Country_Name>
<Folder_Title>General</Folder_Title>
</row>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$sxl = :
<xsl:stylesheet xmlns:xsl='http://www.w3.org/TR/WD-xsl'>
<xsl:template match='/'>
<BODY>
<TABLE BORDER='2'>
<xsl:for-each select='//row'>
<TR>
<TD>
<xsl:value-of select='Resume_Title'/>
</TD>
<TD>
<xsl:value-of select='Country_Name'/>
</TD>
<TD>
<xsl:value-of select='Folder_Title'/>
</TD>
</TR>
</xsl:for-each>
</TABLE>
</BODY>
</xsl:template>
</xsl:stylesheet>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i use this php code:
$xh = xslt_create();
$args = array ( '/xml' => $xml,
'/xml' => $xsl );
$params = array ( 'somevariable' => 'somecontent' );
$result = xslt_process($xh, 'arg:/_xml', 'applicationdetails.xsl', NULL, $args,$params);
if (!$result) die('XSLT processing error: '.xslt_error($xh));
print ($result);
xslt_free($xh);