Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. (Another) XSLT - identity template - question [modified]

(Another) XSLT - identity template - question [modified]

Scheduled Pinned Locked Moved XML / XSL
xmlwpfcomregexquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Losinger
    wrote on last edited by
    #1

    i want to remove all "Blah" nodes where the attribute "Foo" starts with value "Bar" :

    <doc>
    ...
    <Blah Foo="Barf">
    .... delete this node
    </Blah>
    <Blah Foo="Goo">
    .... don't delete this node
    </Blah>
    <Beep Foo="Bar">
    .... don't delete this node
    </Beep>
    ....

    </doc>

    i'm sure this is a trivial extension of the basic identity template, but i just can't figure this out. -- modified at 22:18 Friday 10th August, 2007 nevermind:

    <xsl:template match="@*|node()">
    xsl:copy
    <xsl:apply-templates select"@*|node()"/>
    </xsl:copy>
    </xsl:template>
    <xsl:template match="Blah[starts-with(@Foo, 'Bar')]" />

    image processing toolkits | batch image processing | blogging

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups