View Full Version : xml/xsl


Black
04-05-2003, 01:40 PM
asa o intrebare
in xsl una din posibilitatile de a pune o coonditie e:

<xsl:if test="UserR>1">
face ceva
</xsl:if>


unde xml-ul e cam asa:

<?xml version="1.0" encoding="WINDOWS-1251" ?>
<?xml-stylesheet type='text/xsl' href='Sablon.xsl'?>
<User>
<UserR>2</UserR>
</User>


m-am uitat prin exemple si parca e asa da mi-mi da

Expected token 'eof' found '>'. UserR-->><--1

Bion
04-09-2003, 03:47 PM
NOTE: When an XPath expression occurs in an XML document, any < and <= operators must be quoted according to XML 1.0 rules by using, for example, & and &=. In the following example the value of the test attribute is an XPath expression:
<xsl:if test="@value & 10">...</xsl:if>
The right angle bracket (>) may be represented using the string "&".

:)

Black
04-09-2003, 05:25 PM
sanks, voi incerca, da vre-un link la textul dat se poate?
io am ceva exemple si acolo e exact cum am scris io

<xsl:if test="price &г т ; 10">..</xsl:if>

si xml-ul asa

<catalog>
<cd>
<price>10.90</price>
</cd>
</catalog>

si ruleaza
la mine, exemplul meu anume, nu :(

legenda: &г т ; e de fapt semnul mai mare, dar aici se parseaza intr-un fel anume si ramane doar semnul & ;)

Bion
04-09-2003, 06:06 PM
iaca: http://www.w3.org/TR/REC-xml#syntax