[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XHTML to XHTML transform

Subject: XHTML to XHTML transform
From: "Jeffrey Moss" <jeff@xxxxxxxxxxxx>
Date: Fri, 2 Apr 2004 10:55:54 -0700
xhtml transform
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.