Yes, One thing did bother me though, it seemed like you were wanting to solve 
your overall problem kind of 'backwards' weren't you? That is to say lets 
suppose you have an XML document like so:

<content>
        <table>
        ....
        </table>
</content>

Then you can have your template just do something like:

<xsl:template match='/'/>
        <html>
                <head/>
                <body>
                        <xsl:apply-templates/>
                </body>
        </html>
</xsl:template>

<xsl:template match='content'>
        <xsl:copy-of select="*"/>
</xsl:template>

and that will always put WHATEVER is inside content into your page, so you can 
now have your overall page structure in one place and just slap in the guts 
of whatever page is actually being viewed.

You can obviously elaborate this as much as you want, and by replacing the 
'content' template with more sophisticated ones you can handle other things 
besides XHTML. I've got templates that work pretty well with things like 
docbook XML, some OO files, and some other oddball things. They all end up 
looking just like pages on my site. You can also have multiple insertion 
points by using one tag level deeper structure in your content, so if its 
like:

<content>
        <title>What I want in my title</title>
        <sidenav>...</sidenav>
        <body>...</body>
        <footer>....</footer>
</content>

Then your XSLT can pick out each section and insert it anywhere you want in 
your page, so each page could have a different title, nav, content, and 
footer... 

Now if you make an interface let people upload and specify different XSLT 
templates you are a long way to a web content authoring system.... ;o). 

On Wednesday 03 December 2003 9:54 pm, Christian Jaeger wrote:
> ok, Kip explained me everything in irc. (Looks like I'm still an XSLT
> newbie - not that this would surprise me. But to be fair to myself:
> it looks like even some article authors haven't understood xsl, like
> of the one I linked in my mail)
>
> Correct is:
>
>    <xsl:template name="allexceptentry">
>      <xsl:copy-of select="$main"/>
>    </xsl:template>
>
>    <xsl:call-template name="allexceptentry">
>      <xsl:with-param name="main">
>          ..<foo>...</foo>..
>      </xsl:with-param>
>    </xsl:call-template>
>
> Christian.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to