Subject: RE: [xsl] xsl Greater than and Less than. From: "Michael Kay" <mhk@xxxxxxxxx> Date: Mon, 6 Oct 2003 15:20:29 +0100 |
> > Hello, > > I am trying to use the > and < escapes but they are not > working; on the other hand the = and != does work. Can > anyone tell me what > is wrong - maybe it's the namespaces. Well, the namespace xmlns:xs="http://www.w3.org/2001/XMLShcema" isn't going to get you very far, but fortunately you don't actually use it. What processor are you using for this? XSLT 1.0 processors do not provide string comparisons using the < and > operators. Michael Kay > > <?xml version="1.0"?> > > <xsl:stylesheet version="2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xs="http://www.w3.org/2001/XMLShcema" > xmlns="http://www.w3.org/TR/REC-html40"> > > <xsl:template match="/"> > <xsl:variable name="George" select="'2003-08-19'"/> > <xsl:variable name="Drafts" select="'The following packages > were delivered: > (in the past week)'"/> > > > <xsl:value-of select="$Drafts"/> > <div style="font-family:Arial; border:solid tan; color: > black; font-size:1; > background-color:lightyellow"> > <HTML> > <BODY> > > > <xsl:for-each select="AVAIL/AVAILABILITY" > > <xsl:if test="CUTTER[@projkind!='IND']"> > <xsl:if test="REV0DUE < $George"> > > <font size="2pt"><xsl:value-of select="CUTTER"/>, </font> > > </xsl:if> > </xsl:if> > > </xsl:for-each> > > </BODY> > </HTML> > </div> > > </xsl:template> > > </xsl:stylesheet> > > Part of XML doc: > > <?xml version="1.0" standalone="no"?> > <?xml-stylesheet type="text/xsl" href="vavail.xsl"?> > <AVAIL xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="vavail.xsd"> > <AVAILABILITY> > <CUTTER projkind=' YD' yr='03' avtp='DD ' vsl='ABBIE > BURGESS'>ABBIE BURGESS > 03 DD YD</CUTTER> > <PE>JLW</PE> > <NOTES></NOTES> > <WKLSTDUE time='2003-03'>2003-03-26</WKLSTDUE> > <WKLSTRC time='2003-05'>2003-05-05</WKLSTRC> > <D1DUE time='2003-05'>2003-05-28</D1DUE> > <D1DEL>2003-06-16</D1DEL> > <D2DEL></D2DEL> > <ATMSCHED time='2003-07'>2003-07-09</ATMSCHED> > <ATMMSSENT>2003-06-26</ATMMSSENT> > <ATMHELD>2003-06-27</ATMHELD> > <REV0DUE time='2003-08'>2003-08-06</REV0DUE> > <REV0DEL>2003-07-13</REV0DEL> > <REV1></REV1> > <REV2></REV2> > <REV3></REV3> > <REV4></REV4> > <REV5></REV5> > <THDATM time='2003-11'>2003-11-19</THDATM> > <TYPVES>WLM 175</TYPVES> > <COMPL>100%</COMPL> > </AVAILABILITY> > <AVAILABILITY> > <CUTTER projkind=' YD' yr='04' avtp='DS ' vsl='ABBIE > BURGESS'>ABBIE BURGESS > 04 DS YD</CUTTER> > <PE>JLW</PE> > <NOTES></NOTES> > <WKLSTDUE time='2004-03'>2004-03-24</WKLSTDUE> > <WKLSTRC time=''></WKLSTRC> > <D1DUE time='2004-05'>2004-05-26</D1DUE> > <D1DEL></D1DEL> > <D2DEL></D2DEL> > <ATMSCHED time='2004-07'>2004-07-07</ATMSCHED> > <ATMMSSENT></ATMMSSENT> > <ATMHELD></ATMHELD> > <REV0DUE time='2004-08'>2004-08-04</REV0DUE> > <REV0DEL></REV0DEL> > <REV1></REV1> > <REV2></REV2> > <REV3></REV3> > <REV4></REV4> > <REV5></REV5> > <THDATM time='2004-11'>2004-11-17</THDATM> > <TYPVES>WLM 175</TYPVES> > <COMPL>0%</COMPL> > </AVAILABILITY> > </AVAIL> > > Schema: > > <?xml version="1.0"?> > <xsd:schema="http://www.w3.org/2001/XMLSchema"> > <xsd:annotation> > <xsd:documentation> > This is vavail xml schedma definition xsd > </xsd:documentation> > </xsd:annotation> > > <xsd:complexType name="AVAILtype"> > <xsd:sequence> > <xsd:group ref="AVAILABILITYtype"> > </xsd:sequence> > <xsd:group name="AVAILABILITYtype" minOccurs="0" > maxOccurs="unbounded"> > <xsd:sequence> > <xsd:element name="CUTTER" type="xsd:string"/> > <xsd:element name="PE" type="xsd:string"/> > <xsd:element name="NOTES" type="xsd:string"/> > <xsd:element name="WKLSTDUE" type="xsd:date"/> > <xsd:element name="WKLSTRC" type="xsd:date"/> > <xsd:element name="D1DUE" type="xsd:date"/> > <xsd:element name="D1DEL" type="xsd:date"/> > <xsd:element name="D2DEL" type="xsd:date"/> > <xsd:element name="ATMSCHED" type="xsd:date"/> > <xsd:element name="ATMMSSENT" type="xsd:date"/> > <xsd:element name="ATMHELD" type="xsd:date"/> > <xsd:element name="REV0DUE" type="xsd:date"/> > <xsd:element name="REV0DEL" type="xsd:date"/> > <xsd:element name="REV1" type="xsd:date"/> > <xsd:element name="REV2" type="xsd:date"/> > <xsd:element name="REV3" type="xsd:date"/> > <xsd:element name="REV4" type="xsd:date"/> > <xsd:element name="REV5" type="xsd:date"/> > <xsd:element name="THDATM" type="xsd:date"/> > <xsd:element name="COMPL" type="xsd:string"/> > <xsd:element name="TYPVES" type="xsd:string"/> > </xsd:sequence> > </xsd:group> > </xsd:schema> > > George Tucker > USCG MLCA (vs) > Phone: 757-628-4570 > Fax: 757-628-4585 > eMail: gtucker@xxxxxxxxxxxxx > > > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl Greater than and Less tha, Tucker, George | Thread | RE: [xsl] xsl Greater than and Less, SHEIKH Sajjad |
RE: [xsl] XPath 2.0: Problems with , Michael Kay | Date | RE: [xsl] XPath 2.0: Problems with , Michael Kay |
Month |