Software is like sex... It's better when it's free.

Blog - Tag 'xpath'

As everyone has seen, this is not easy to find time to write news but ..

Here it is, the year 2011 began, the perfect opportunity to make a first report after more than three years spent in intensive web development alongside SillySmart and now Wandi.

3 ans de développement Web

The first year of Wandi was very rich with the completion of more than 30 websites.

A big thank you to all those who trust us and allow to advance the adventure with Wandi and SillySmart.

Not forgetting all those who are with us every day: the Wandiz, Charlie, Jeremy, Mickey, Chatton, Nsn guys and all others..

Happy New Year !
Tags:  ajaxjsonmysqlphpsillysmartwandixmlxpathxsl.
Posted the Monday 03 january 2011 15:56:16 - 0 comment

For fans of the XML/XSL/XPath combo, a small trick when you push it the limits of generic to form an XPath expression dynamically.

Suppose a xsl variable contains an "end" of the XPath expression (one node), this would give us this:

<!--
  - Select a xml node with a dynamic xPath expression
  -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" xmlns="http://www.w3.org/1999/xhtml">
  <xsl:template match="root">
    <xsl:variable name="dynamicNode" select="'user_name'" />

    <!-- this will give this xPath = "//root/bdd/users[1]/user_name" -->
    <xsl:value-of select="bdd/users[1]/*[name()=$dynamicNode]" />

  </xsl:template>
</xsl:stylesheet>
Tags:  xmlxpathxsl.
Posted the Tuesday 28 april 2009 20:39:02 - 0 comment