How can I search an XML file without a dynamic language?
- by jeph perro
Let me try to explain my situation:
We are using a CMS which 'bakes' a website, and you publish it to a webserver. The published site contains only static HTML ( or XML ) pages ( generated from the content in the CMS database ).
I imported an XML file with the names and phone numbers from the company phone directory.
Using only XSLT, can I create a way to search that directory?
For example, if my XML file, directory.xml looks like this:
<directory>
<person>
<fname>Ryan</fname>
<lname>Purple</lname>
<phone>887 778 5544</phone>
</person>
<person>
<fname>Tanya</fname>
<lname>Orange</lname>
<phone>887 998 5541</phone>
</person>
<directory>
Can I create a way to search for a person with the last name starting with "Pur" ?
Can I pass a parameter to the XSLT?
Can I search the XML tree to match the string in the parameter?