[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl filters pipeline again...

Subject: xsl filters pipeline again...
From: "Errea Alexandra" <aleph675@xxxxxx>
Date: Tue, 21 Jan 2003 22:10:51 +0200
xsl filters
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.