[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Processing Stylesheet with multiple namespaces

Subject: Re: Processing Stylesheet with multiple namespaces
From: Michael Daniloff <mdanilof@xxxxxxxxx>
Date: Mon, 24 Sep 2007 17:15:05 -0700 (PDT)
Re:  Processing Stylesheet with multiple namespaces
Thanks Abel,

that's what I ended up with. So far it works.

The stylesheets that implicitly operate on "o" prefix
leave behind the elements and attributes from that
namespace. I know it is crooked but.....

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

  <xsl:template match="w:object">
    <w:pict>
      <xsl:apply-templates/>
      <xsl:apply-templates select="v:shape" mode="k"/>
     
    </w:pict>
  </xsl:template>

  <xsl:template match="v:shape" mode="k">
    <v:shape>
      <xsl:attribute name="id">
        <xsl:value-of select="@id"/>
      </xsl:attribute>
      <xsl:attribute name="type">
        <xsl:value-of select="@type"/>
      </xsl:attribute>
      <xsl:attribute name="style">
        <xsl:value-of select="@style"/>
      </xsl:attribute>
      <xsl:apply-templates/>
    </v:shape>
  </xsl:template>

  <xsl:template match="v:shape"/>
  <xsl:template
match="//*[local-name()='OLEObject']"/>


---------Original Message ----------

Date: Sat, 22 Sep 2007 22:26:51 +0200
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Abel Braaksma <abel.online@xxxxxxxxx>
Subject: Re:  Processing Stylesheet with multiple
namespaces
Message-ID: <46F57A8B.6050900@xxxxxxxxx>

You can remove *any* xxx:OLEObject with the following
throw-away
 template:

    <xsl:template match="*[local-name(.) =
'OLEObject']" />

Or (but not sure if this was newly added in XSLT 2.0,
so try it out, if
 
you get an error use local-name instead)

    <xsl:template match="*:OLEObject" />

Or, if you want to be specific:

    <xsl:template match="w:OLEObject | o:OLEObject" />

Cheers,
-- Abel Braaksma



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.