Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] XHTML to XHTML transform

From: "Jeffrey Moss" <jeff@------------>
To:
Date: 4/2/2004 7:56:00 AM
I want to create XHTML files and run them through some transforms to turn
things like this:

<BODY>
<BOX>
    <TITLE>Title</TITLE>
    Hello World
    <FOOTER>Footer</FOOTER>
</BOX>
</BODY>

Into this:

<BODY>
<DIV ID="box">
    <DIV ID="top">
        <DIV ID="topleft">
        <DIV ID="topright">
        <SPAN ID="title">Title</SPAN>
    </DIV>
    Hello World
    <DIV ID="bottom">
        <DIV ID="bottomleft">
        <DIV ID="bottomright">
        <SPAN ID="footer">Footer</SPAN>
    </DIV>
</DIV>
</BODY>

...using a one time build file, or one time XSL transform. I all standard
XHTML content to remain intact, even stuff inside the "footer" element, and
everything. I'm pretty sure this will require the <apply-templates /> tag
all over the place, which is fine.

I have tried a number of different approaches already. I played around with
the xmlns:xhtml namespace in my XSL file (not sure if I ever did this
correctly, I don't think I fully understand what namespaces do).

I tried XSL copy in my templates but there doesn't seem to be a way to say
"apply templates or else copy node and apply templates"

I also tried to define a template that matches "*" for any unmatched node,
and copy the element and parameters and then apply templates on the content.

I also played with the xsl:output tag to see if I could get that to do
something cool, but no.

Please help!

-Jeff


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