RE: [xsl] xsl filters pipeline again...

Subject: RE: [xsl] xsl filters pipeline again...
From: cknell@xxxxxxxxxx
Date: Tue, 21 Jan 2003 15:49:35 -0500
> 1)the first filter should choose between the language(1 or 2)
> assuming that this parameter is taken from a database after 
> a query concerning what the user wants.
>
> 2)the second one should do the same thing on this xml file 
> and not the original one but it should exclude two out of 
> the three levels,e.g. level 1 and level 2, assuming that 
> the user wants only level 3 info
>
> 3)now the last filter should  choose between displays and 
> it should give me an html output showing an image if i have
> display=2 or a simple html text if i have display=1.

It is hard to tell from your description if your application receives each of the three pieces of information at different times, or if two or all three pieces of information are available at the same point.

If each piece of information becomes available at different times, then you will need a transformation pipleline. If all three pieces of information are known before the transformations begin, then you won't need a transformation pipeline, you can do it all in one stylesheet by passing parameters to it.

Please clarify this and I'll continue the reply on the right path.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     "Errea Alexandra" <aleph675@xxxxxx>
Sent:     Tue, 21 Jan 2003 22:10:51 +0200
To:       <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  [xsl] xsl filters pipeline again...

Hello again!!! Thank u for answering  me so quickly!What i want to do with
these filters is:
1)the first filter should choose between the language(1 or 2) assuming that
this parameter is taken from a database after a query concerning what the
user wants. (never mind this for now...)So it should give me an xml output
which should look like this,assuming that the user speaks english:

<?xml version="1.0" encoding="ISO-8859-7"?>
<?xml-stylesheet type="text/xsl" href="023.xsl"?>
<SITES>
<CONTENT><!--English -->
<LAN>1</LAN>       <!-- 1.EN -->
<LEVEL>1</LEVEL>
<DISPLAY>1</DISPLAY> <!-- 1.SMS  2.WAP 3.WEB -->
<TITLE>Mars Hill</TITLE>
<TEXT>yess</TEXT>
<IMAGE></IMAGE>
</CONTENT>
<CONTENT>
<LAN>1</LAN>       <!-- 1.EN -->
<LEVEL>2</LEVEL>
<DISPLAY>1</DISPLAY> <!-- 1.SMS  2.WAP 3.WEB -->
<TITLE>Mars Hill</TITLE>
<TEXT>hello</TEXT>
<IMAGE></IMAGE>
</CONTENT>
<CONTENT>
<LAN>1</LAN>       <!-- 1.EN -->
<LEVEL>3</LEVEL>
<DISPLAY>1</DISPLAY> <!-- 1.SMS  2.WAP 3.WEB -->
<TITLE>Mars Hill</TITLE>
<TEXT>hola</TEXT>
<IMAGE></IMAGE>
</CONTENT>
</SITES>

2)the second one should do the same thing on this xml file and not the
original one but it should exclude two out of the three levels,e.g. level 1
and level 2, assuming that the user wants only level 3 info,so it should
give me an xml output like this:

<?xml version="1.0" encoding="ISO-8859-7"?>
<?xml-stylesheet type="text/xsl" href="023.xsl"?>
<SITES>
<CONTENT>
<LAN>1</LAN>       <!-- 1.EN -->
<LEVEL>3</LEVEL>
<DISPLAY>1</DISPLAY> <!-- 1.SMS  2.WAP 3.WEB -->
<TITLE>Mars Hill</TITLE>
<TEXT>hola</TEXT>
<IMAGE></IMAGE>
</CONTENT>
</SITES>

3)now the last filter should  choose between displays and it should give me
an html output showing an image if i have display=2 or a simple html text if
i have display=1. I havemanaged to show an image with an xsl stylesheet with
an html output. So the problem is how to combine these things.Should i have
only one xsl,using xsl:import for example...or should i have three different
xsl's???And where should i declare these?
I've tried this only for the first filter with ur help but it doesn't give
me anything :(((

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" version="4.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates/>
<xsl:for-each select="SITES/CONTENT">
<xsl:if match=".[LAN='1']">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>

Thank you in advance and sorry for the huge question....I'm reaally stuck:(





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread