|
Subject: Re: [xsl] Processing Stylesheet with multiple namespaces From: Michael Daniloff <mdanilof@xxxxxxxxx> Date: Mon, 24 Sep 2007 17:15:05 -0700 (PDT) |
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: [xsl] 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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Processing Stylesheet wit, Florent Georges | Thread | Re: [xsl] Processing Stylesheet wit, Michael Daniloff |
| Re: [xsl] Checking alphabetical ord, Wendell Piez | Date | Re: [xsl] Processing Stylesheet wit, Michael Daniloff |
| Month |