wp-select-xml

<xsl:include href="../plugins/tenandtwo-xslt-processor/xsl/wp.xsl" />

<xsl:call-template name="wp-select-xml">
    <xsl:with-param name="xml"    select="$xml" />
    <xsl:with-param name="select" select="$select" />
    <xsl:with-param name="cache" select="$cache" />
    <xsl:with-param name="format" select="$format" />
    <xsl:with-param name="root"   select="$root" />
    <xsl:with-param name="strip-namespaces" select="$strip-namespaces" />
</xsl:call-template>

TEST 1 : PASS
wp-select-xml :
– select = /

result :

  <RESULT template="wp-select-xml">
    <NODATA/>
  </RESULT>


TEST 2 : PPASS
wp-select-xml :
– xml = sample-xml
– select = //comment
– cache = 10
– format = xml
– root = DATA
– strip-namespaces = no

result :

  <RESULT template="wp-select-xml">
    <DATA xml="sample-xml" id="876" select="//comment">
      <comment>This is a test WordPress XML Document item</comment>
    </DATA>
  </RESULT>


TEST 3 : PASS
wp-select-xml :
– xml = sample-xml
– select = //item
– format = json
– root = JSON

result :

  <RESULT template="wp-select-xml">{"JSON":[{"attributes":{"xml":"sample-xml","id":"876","select":"\/\/item"},"item":[{"attributes":{"value":"1"},"cdata":"One"},{"attributes":{"value":"2"},"cdata":"Two"},{"attributes":{"value":"3"},"cdata":"Three"},{"attributes":{"value":"4"},"cdata":"Four"}]}]}</RESULT>