Hi there,
I have Slabtron and Expat installed along with PHP (last version i believe)
what i think my problem is that i don't know how to wirte XSL right .. how to make it output only <title>My Title</title> for example without displaying all other XML elements..
when i apply XSL on XML, it outputs every single node and chid node from xml, and formats only those that i describe in XSL, IS THERE anyway to output only 3 fields (don't output the rest of the XML), in a formatted XSL template - like have title on the left side, name and date underneath, and from there it links to the page where all info is displayed ..
here are my XML, XSL, PHP files..
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);