xsl-list
[Top] [All Lists]

RE: XHTML to XHTML transform

2004-04-02 11:34:38
If you want us to show you where you've gone wrong, you'll have to show us
your code.

Michael Kay

-----Original Message-----
From: Jeffrey Moss [mailto:jeff(_at_)opendbms(_dot_)com] 
Sent: 02 April 2004 17:56
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] XHTML to 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


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





<Prev in Thread] Current Thread [Next in Thread>