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. Xslt Transformation

Xslt Transformation

Scheduled Pinned Locked Moved XML / XSL
xmlhelpwpfcomregex
1 Posts 1 Posters 4 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.
  • T Offline
    T Offline
    tellaston1345
    wrote on last edited by
    #1

    Hi Guys, I am doing xslt transformation on a sample xmldoc using the xslt below. The problem I am having is its not matching on the 'Publication' tag. If I remove the namespace it works fine. Is there a way to get the match on the 'Publication' tag with the namespace in it? Any help would be much appreciated, Thanks. ----Sample XML------

    <?xml version="1.0" encoding="utf-8"?>
    <Publication xmlns="http://www.mycompany.com/Sampleproject/XmlSchema">
    <PublicationDetails>
    <AgencyId>1</AgencyId>
    <PublicationId>PublicationId1</PublicationId>
    <PublicationDateTime>1900-01-01T01:01:01-07:00</PublicationDateTime>
    <OriginatingSystemName>OriginatingSystemName1</OriginatingSystemName>
    <DestinationSystemName>DestinationSystemName1</DestinationSystemName>
    </Publication>

    ---- Sample Xslt ------

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
    <xsl: output method="xml" indent="yes"/>

    <xsl:template match="@* | node()">
    xsl:copy
    <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
    </xsl:template>

    <xsl:template match="Publication">
    <xsl:apply-templates select ="PublicationDetails"/>
    </xsl:template>

    <xsl:template match="PublicationDetails">
    <SubmittingAgency>
    </SubmittingAgency>
    </xsl:template>

    </xsl:stylesheet>

    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