tags:

views:

17

answers:

0

I have an XML file that I use for storing and displaying recipes that I collect, but that same XML file also has updates for the site at the top of it. How would I, say, use Recipes.xsl to transform Recipes.xml for display as an actual website, and use RecipesRSS.xsl to transform Recipes.xml into Recipes.rss?

Currently, my XML file is formatted something like this:

<book>
    <updates>
        <update when="2010-04-19">
            <format>
                <update>Formatting updates here, if any. Otherwise, omit the Format section.</update>
                ...
            </format>
            <recipes>
                <update>Recipe updates here, if any. Otherwise, omit the Recipes section.</update>
                ...
            </recipes>
        </update>
        ...
    </updates>
    <recipe name="Recipe Name">
        <from>Recipe source</from>
        <category>Recipe category</category>
        <ingredients>
            <ingredient>Recipe ingredient</ingredient>
            ...
        </ingredients>
        <instructions>
            <step>Recipe instructions go here.</step>
            ...
        </instructions>
        <notes>
            <note>Additional notes go here, if any. Otherwise, Notes section is omitted.</note>
            ...
        </notes>
    </recipe>
    ...
</book>

Any help would be greatly appreciated.