Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Processing Mixed Content (combining copy-of and apply-templates?)

From: "Dimitre Novatchev" <dimitren@---.---.-->
To: NULL
Date: 1/4/2007 5:02:00 PM


"KW" <kevinw@a...> wrote in message 
news:1167949889.753016.30180@q......
> If I have an xml snippet like...
>
> <mytag>
>  <h1>A Title Here</h1>
>  <p>A paragraph here</p>
>  <myothertag someatt="something">
>    <more tags />
>  </myothertag>
>  <p>A final paragraph</p>
> </mytag>
>
> which contains both XHTML and some custom XML tags, how can I have my
> XSL stylesheet process the XHTML tags using a <copy-of> approach
> (simply outputting the markup as is) and also process the custom XML
> tags using a <apply-templates> approach, all while maintaining the
> order of the items in the result tree?
>
> I know I could write templates for every possible HTML tag along with
> templates for my custom XML tags, but that seems like more work than
> necessary. The idea is that I want to be able to combine XHTML and
> custom tags within a specific element, but only really override the
> processing for the custom XML tags.
>
> Is this even possible?

Yes, and it is very easy :o)

Do read about "identity template" or "identity transformation".

Cheers,
Dimitre Novatchev 




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