Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] XHTML to XHTML transform

From: "Andreas L. Delmelle" <a_l.delmelle@---------->
To:
Date: 4/2/2004 9:41:00 AM
> -----Original Message-----
> From: Jeffrey Moss [mailto:jeff@xxxxxxxxxxxx]
>
<snip />
> So now what I did was I added xsl:apply-templates to the middle
> of the link
> template, and I added a default template for all other nodes, I knew I was
> on the right track so thanks for the help.
>
> But what I really wanted was that all elements in the XHTML
> namespace would
> be outputted to the results, and all of my extra XML tags like "name" for
> instance, wouldn't be copied. Is this what the XHTML namespace is for?
>

Hi,

Well, there are a number of possible approaches:

- keep the general matching template as is, and add an empty template in
which you specify which nodes are to be left alone:

<xsl:template match="name | id | short-description | ..." />

(I think this is your best shot if all of the source XML is in the same (no)
namespace, so the elements that are not to be processed have to be specified
on an individual basis to be able to distinguish them from those you do want
processed.)

- make sure the elements you *do* want templates to be applied to are
already in the XHTML namespace in the source XML, and make the general copy
template match pattern :

<xsl:template match="*[namespace-uri()='http://www.w3.org/1999/xhtml']">


Hope this helps!

Cheers,

Andreas


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent