list4xt : Mailing list for the XT users community.
[list4xt] Re: [Rmdms-devel] Re: Simple question about XSLT.
Subject: [list4xt] Re: [Rmdms-devel] Re: Simple question about XSLT.
User: Website From: Paul Tchistopolskii (pault12@pacbell.net)
Date: 31/10/2000 - 17:41
Thank you for answering.
Not a solution, sorry.
As I said, there could be same tags in both DTDs. For example.
This could be worked around with modes, but this will require
modification / 'synchronization' of the stylesheets. ( This is
overkill from my point of view, because in Ux there is no need
to modify anything in the stylesheets. ).
Rgds.Paul.
----- Original Message -----
From: <Larry_Mason@i2.com>
To: <list4xt@4xt.org>
Cc: <list4xt-bounce@4xt.org>; <rmdms-devel@lists.sourceforge.net>; <sml-dev@eGroups.com>
Sent: Tuesday, October 31, 2000 5:42 AM
Subject: [Rmdms-devel] Re: [list4xt] Simple question about XSLT.
>
> Try this. Create a variable that contains the results of transforming
> tagset 1 into tagset 2. Create a node set from tagset 2 and re-process
> into the final tagset 3.
>
> <xsl:variable name="temp">
> <my:table title="A table title goes here">
> <my:tr header="yes">
> <my:td>Project Name</i2:td>
> <my:td>Description</i2:td>
> <my:td>Item</i2:td>
> <my:td>Customer</i2:td>
> <my:td>Customer Site</i2:td>
> </my:tr>
> <xsl:apply-templates select="*" mode="pass1"/>
> </my:table>
> </xsl:variable>
> <xsl:apply-templates select="xt:node-set($temp)"/>
>
> <xsl:template match="my:table">
> <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" class
> ="tableBorder">
> <TR>
> <TD>
> <TABLE width="100%" border="0" cellspacing="1" cellpadding="0">
> <TR class="tableTitle">
> <TD nowrap="yes"><xsl:value-of select="@title"/></TD>
> </TR>
> </TABLE>
> <TABLE width="100%" border="0" cellspacing="1" cellpadding="2">
> <xsl:apply-templates/>
> </TABLE>
> </TD>
> </TR>
> </TABLE>
> </xsl:template>
>
> Cheers!
> Larry
> --------------------------------------------------------------------------------------
>
> Remember 2 wrongs don't make a right, but 3 lefts do.
> --------------------------------------------------------------------------------------
>
>
> I'm sorry if this off-topic for this list, but at the moment
> I see no better place on the web where to ask.
>
> I have one very simple question about XSLT.
>
> So here is the usecase.
>
> 1. I have some XML layer for rendering complex
> Web pages. Let's say that I have something like:
>
> <PAIR>
> <W-IMG> some.gif </W-IMG>
> <TEXT>
> <para> some content here </para>
> <picture>picture.gif</picture>
> </TEXT>
> </PAIR>
>
> And stuff like that.
>
> I have the stylesheet render-html.xsl which renders
> those objects into beautiful HTML.
>
> 2. Now I have some xml document which contains,
> for example, product descriptions.
>
> Like
>
> <product>
> <version>0.1</version>
> <installation>
> <step> do something </step>
> </installation>
> </product>
>
> And stuff like that.
>
> Now I want to render a beautiful HTML page out of
> <product>
>
> Let's call the stylesheet render-product.xsl
>
> Of course, it looks crazy to include custom HTML tags
> for 'widgets', like <PAIR> into render-product.xsl,
> because I already have render-html.xsl ( which
> understands <PAIR> )
>
> So what I should do is to render <product> into <PAIR>
> e t.c. and then render <PAIR> into html.
>
> By the way, some tags are, of course, common for
> both DTD's. For example, let's assume that both DTD's
> allow user to use, say, <BR/>. Or <I>. Or <B>. Or <P>.
>
> Because the situation is typical ( right?), I think
> maybe XSLT provides some obvious and clear
> solution for this situation?
>
> ***************
> I mean how to do that with one transformation?
> ***************
>
> What should be a combination of xsl:include / import ?
> How render-product-2-html.xsl should look like ?
>
> Doing this with pipe of 2 stylesheets is trivial, but
> that's Ux design pattern, not XSLT design pattern.
>
> I'l greatly appreciate any idea. I tried some XSLT
> tricks, but I feel that there is simply no support for
> this usecase in XSLT design, because every solution
> I found - has some drawback. Conflicting templates
> or stuff like that.
>
> This is very important question, actually. I'l be very happy
> to get any answer.
>
> Rgds.Paul.
>
> PS. I'm also wondering what is the experience gained
> from years of SGML-based publishing and if there is
> any support for the usecase described above in
> SGML / DSSSL
>
--
Mailing list for the XT users community. (http://fortmeadechamber.com)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET
webmaster@4xt.org
|