How do I get my XSLT to open HTML/PHP and accept an entire XML node rowset? -


so far when click on xslt embedded in hyperlink, page want. but, need help! need style_sheet pass entire row.node result parameter or array onclick can embed , manipulate via html resulting page call.

<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="property_resi.xsl"?> <rows>     <row>         <listingprice>124000.00</listingprice>         <listingrid>59999991</listingrid>         <status>active</status>         <statuscomments></statuscomments>         <statusdate>2007-07-24t00:00:00</statusdate>         <stories>1.00</stories>         <streetdirection>east</streetdirection>         <streetname>san sircettia</streetname>         <streetnumber>410</streetnumber>         <streetnumbermodifier></streetnumbermodifier>         <streetpostdirection></streetpostdirection>         <streetsuffix>st</streetsuffix>         <yearbuilt>1999</yearbuilt>         <zipcode>99999</zipcode>     </row>     <row>         <listingprice>98000.00</listingprice>         <listingrid>59999992</listingrid>         <status>active</status>         <statuscomments></statuscomments>         <statusdate>2007-07-24t00:00:00</statusdate>         <stories>1.00</stories>         <streetdirection>south</streetdirection>         <streetname>tuscany</streetname>         <streetnumber>560</streetnumber>         <streetnumbermodifier></streetnumbermodifier>         <streetpostdirection></streetpostdirection>         <streetsuffix>circle</streetsuffix>         <yearbuilt>2000</yearbuilt>         <zipcode>99999</zipcode>     </row>     <row>         <listingprice>805000.00</listingprice>         <listingrid>59999993</listingrid>         <status>active</status>         <statuscomments></statuscomments>         <statusdate>2007-07-24t00:00:00</statusdate>         <stories>1.00</stories>         <streetdirection>west</streetdirection>         <streetname>hill view park</streetname>          <streetnumber>2205</streetnumber>         <streetnumbermodifier></streetnumbermodifier>         <streetpostdirection></streetpostdirection>         <streetsuffix>drive</streetsuffix>         <yearbuilt>1978</yearbuilt>         <zipcode>99999</zipcode>     </row> </rows>       <xsl:stylesheet version="1.0"      xmlns:xsl="http://www.w3.org/1999/xsl/transform"     xmlns:php="http://php.net/xsl">         <xsl:template match="/">             <html>           <body>           <h2>current listings</h2>                <table border="1">                       <tr bgcolor="#9acd32"> </tr>                       <xsl:for-each select="rows/row">                   <xsl:sort select="city"/>                   <xsl:sort select="zipcode"/>                        <tr> <td><a href="property_resi_xslt.html">                                             <xsl:value-of-select=                                                   "concat(streetnumber, ' ',                                                       streetdirection, ' ',                                                        streetname, ' ',                                                     streetsuffix, ' - ', city,                                                     ',', zipcode, ' - ', '$',                                                     listingprice)"/>                                                     </a>                                                     </td>                     </tr>                   </xsl:for-each>                  </table>               </body>     </html>    <?xml version="1.0"?> <!doctype html public "-//w3c//dtd xhtml 1.1//en" `"http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="expires" content="fri, jan 01 1900 00:00:00 gmt" /> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="lang" content="en" /> <meta http-equiv="content-script-type" content="text/javascript"/> <meta name="author" content="" /> <meta http-equiv="reply-to" content="@.com" /> <meta name="generator" content="phped 8.0" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="creation-date" content="06/09/2012" /> <meta name="revisit-after" content="15 days" /> <title>results page</title> </head>      <body>           insert & manipulate`code here` xml results here!!!!      </body> </html> 

you generating html in browser using xml , xslt, when browser runs , displays html no longer reference original xml document. so, not passing "row.node result parameter". have ensure data in row set somehow placed in html document, can passed php page.

you give example in comment

 <a href="property_resi_xslt_test.php?listingrid=$listingrid;"><xsl:value-of select="concat(streetnumber,' ', streetdirection, ' ',streetname, ' ', streetsuffix, ' - ', city, ',', zipcode, ' - ','$', listingprice)"/></a> 

so, on right lines already. assuming $listingrid variable have set contains value of listingrid element. syntax want here this

<a href="property_resi_xslt_test.php?listingrid={$listingrid}"> 

this known "attribute value templates". curly braces indicate expression evaluated, rather output literally.

assuming current context row element, wouldn't need variable here, this

<a href="property_resi_xslt_test.php?listingrid={listingrid}"> 

and, if wanted pass more 1 value, can use more 1 avt in expression

<a href="property_resi_xslt_test.php?listingrid={listingrid}&amp;status={status}&amp;zipcode={zipcode}"> 

of course, in php page entirely different question. showing how pass values php in first place.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -