Subject: [xsl] xsl filters pipeline again... From: "Errea Alexandra" <aleph675@xxxxxx> Date: Tue, 21 Jan 2003 22:10:51 +0200 |
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 |
---|
<- Previous | Index | Next -> |
---|---|---|
[xsl] RE: '<' character in href, Lee, Insoo | Thread | RE: [xsl] xsl filters pipeline agai, cknell |
RE: [xsl] '<' character in href, Martinez, Brian | Date | Re: [xsl] Xindice in XSL, J.Pietschmann |
Month |