Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 290 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drop down box and search box to query Xml XSL

#1
I got a page spitting out my .xml feed/file content nicely using the easy to use ( i mean, easy to search for answers) xsl stlyesheets and a bit of xpath logic to get the 'child' photo i want and select the elements in price order ascending etc..

Now I want to link the search bar and drop down menus to dynamically query the document...

I have tried about 4000 searches on stack etc., but it seems that nobody uses XML on webpages; they just use it for fun, parse it and then never use XML dynamically.

I still don't know if I should be storing the XML in a MySQL DB (which would be a nightmare with many tables) and querying that data: I have limped here from countless searches...

I can use PHP , JQuery etc., but don't know which way to aim as there is no black and white direction to follow on forums etc.

This is my XSLT so far:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
a
<div>
<select>
<option value="a">Price To</option>
<option value="b">£100,000</option>
<option value="c">£200,000</option>
<option value="d">£300,000</option>
<option value="e">£400,000</option>
</select>
<select>
<option value="a">Price From</option>
<option value="b">£100,000</option>
<option value="c">£200,000</option>
<option value="d">£300,000</option>
<option value="e">£400,000</option>
</select>
<div id="xsltsearch">
<div class="xsltsearch_form">
<form method="post" action="properties2_1.xml">
<input name="search" type="text" class="input" value="" />
<input type="submit" class="submit" value="Search" />
</form>
</div>
</div>
</div>
<h2>Property Available </h2>
<table >
<tr bgcolor="#DCDCDC">
<th>Address</th>
<th>Bedrooms</th>
<th>Price</th>
<th>Picture</th>
</tr>
<xsl:for-each select="agency/branches/branch/properties/property">
<xsl:sort order="ascending" select="numeric_price" data-type="number"/>
<tr>
<td><xsl:value-of select="advert_heading"/></td>
<td><xsl:value-of select="bedrooms"/></td>
<td><xsl:value-of select="numeric_price"/></td>
<td><img src="{pictures/picture[1]/filename}" width="99px"></img></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through