Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


No Format
<?xml version="1.0"?>
<smooks-resource-list xmlns="">
     <resource-config selector                 xmlns:xsl="">

    <xsl:xsl applyOnElement="$document">
        <resource type="xsl"><xsl:template>
                    xmlns:xsl="" version="1.0"
                    exclude-result-prefixes="smk xhtml"

                <xsl:output method="xml" encoding="UTF-8"/>

                 <xsl:template match="/">
                    <CanonicalOrderFormat xmlns="">
                            <xsl:value-of select="./smk:Order/smk:header/smk:order-id"/>
                                <xsl:value-of select="./smk:Order/smk:order-item/smk:product-id"/>
                                <xsl:value-of select="./smk:Order/smk:order-item/smk:title"/>
                                <xsl:value-of select="./smk:Order/smk:order-item/smk:price"/>


The resource-config tells Smooks to apply the transformation that is declared "inline" in the  resource element on all <Order>. Notice that we are declaring namespace "" with prefix "smk". This namespace is then used in the select expressions to extract the values from the Order xml instance.