Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nathan Purcell 5 posts 25 karma points
    Sep 21, 2012 @ 13:06
    Nathan Purcell
    0

    Adding '@' attributes to a document type property

    Hi guys,

    I'm creating a site that will allow the admin to post events - they will then be able to assign winners of awards within these events.

    Each event has a couple of different awards, so my XML looks similar to this:

    <Event>
    <cup1></cup1>
    <cup2></cup2>
    </Event>

     

    What I would like to do is add an attribute to the awards ("cup1", "cup2" etc. ) so that I can select them all easily in my XSLT.

     

    So the above would become this:

    <Event>
    <cup1 type="award"></cup1>
    <cup2 type="award"></cup2>
    </Event>

     

    Any suggestions?

    Gracias.

     

Please Sign in or register to post replies

Write your reply to:

Draft