I have two xsl pages. One is taking data from a service and show only some data. I have put an anchor to each data, when clicked it, it redirect to other xsl page. I am passing an array to the other xsl. I have no idea how to show those data in that xsl. I have tried it with a url as below which was a success,
<?php error_reporting(E_ALL); $type = @$_REQUEST['angelID']; $id = @$_REQUEST['angelType']; $url = 'http://localhost/level5/level4.php?id='.$id.'&type='.$type; $doc = new DOMDocument(); $doc->load($url, LIBXML_NOBLANKS); $xslt = new XSLTProcessor(); $xsl = new DOMDocument(); $xsl->load( 'detail.xsl', LIBXML_NOCDATA); $xslt->importStylesheet( $xsl ); print $xslt->transformToXML($doc); ?> But I want to replace the url with the data I send from the previous page.I don't want to call the service again as above.Below is how I send data ,
<xsl:for-each select="//Angel"> <div> <xsl:value-of select="@type" /> <xsl:variable name="type"> <xsl:value-of select="." /> </xsl:variable> <a width="160" height="200" href="showInDetailXslt.php?angelType={$type}"> <img style="display: block; margin-left: auto;margin-right: auto"> <xsl:attribute name="src"> <xsl:value-of select="concat('http://localhost/level5/images/',service/images)"/> </xsl:attribute> </img> </a> I don't know how to get it php and show in the other xsl page
No comments:
Post a Comment