[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Simple question about XSLT.

Subject: [list4xt] Simple question about XSLT.

User: Website

From: Paul Tchistopolskii (pault12@pacbell.net)
Date: 31/10/2000 - 04:03


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://firstbankingctr.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