In the last period, we learned the XSL element , which can determine the different output forms by testing the value of XML data (I don't know if you try, actually can also partially implement Features), but sometimes we want to test multiple conditions simultaneously with the same data, and output the corresponding results according to different conditions. Of course, we can use if, if we only have IF available. Fortunately, we have a better choice, then use . The grammar of the related element is described below: Syntax: Property: None, indicating a multi-select test start syntax: Properties: expr ─ script language expression, the calculation result is "true" or "false"; if the result is "true", and through Test, it is displayed in the output. (This property can be omitted). Language ─ The script language type of the expression in the expr property is the same as the value of the Language property of the HTML tag script, which is default to "JScript". TEST - Source data test conditions. Syntax: Properties: None, in a multi-selected test, if there is no condition that specified, if you finally have this tag, the content in this tag is output. . Example: This is here for the student transcript as an example, requires excellent (> 85), generally (70 ~ 85), starting (60 ~ 69), and does not show scores.
The XML document (file name: grade.xml) (file name: grade.xml) is as follows: XML version = "1.0" encoding = "gb2312"?> Xml: stylesheet type = "text / xsl" href = "grade.xsl" ?> Big fat name> 80 English>