Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - RE: [xsl] XHTML to XHTML transform >Thread Next - RE: [xsl] XHTML to XHTML transform Re: [xsl] XHTML to XHTML transformTo: Date: 4/2/2004 10:03:00 AM > 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! Well now you bring up some great points, what if I name my <box> element <mynamespace:box> ??? Does that make things easier? The solution I came up with is to use parameters wherever possible, since I wont need the empty template solution for that (although the option is available if I ever want to use text nodes...). but using the match *[namesapce-uri()='http://www.w3.org/1999/xhtml'] it looks like I could only apply the copy template to elements not in the "mynamespace:" namespace... is that right? -Jeff | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
