Learn XSL with me (6)

zhaozj2021-02-08  252

Today we learn XSL's various operators to meet the requirements of the XSL style prepared to write greater flexibility. Table 1, operator and special characters

The operator describes / selecting a child element, returning the direct child element of the left element; if "/" is located at the left side to indicate the direct child element // recursive decrease in selecting root nodes, regardless of the depth, search the specified element; if located in the most The left side represents the specified element from the root node point, indicating the current element * wildcard, selects any element, does not consider the name @ acquisition attribute value, as the prefix of the attribute name, select any properties, do not consider the name: name The scope separator, separated the name action range prefix with the element or attribute name! * Apply the specified method () * group on the related node, clearly specify the priority [] application filter style [] * subscript operator, Used to indicate an element table in a collection, logical operator

Comparison Operator Optional Mode Description And $ or & & &: Logic or NOT () $ not $ logic Non-Table III, Relationship Operator

= $ EQ $ equivalent = $ IEQ $ Equality (not case sensitive)! = $ NE $ 不 $ ine $ 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不 不= $ Le $ less than equals $ ILE $ less than or equal to (not case sensitive)> $ GT $ greater than $ IGT $ greater than (not case sensitive)> = $ GE $ greater than equals $ IGE $ greater than equals (not case sensitive) $ ALL $ Collection Operator, Returns the "true" $ ANY $ collection operator if all items in the collection are met, return "true" | collection operators, return two collections if any projects meet the criteria, return two collections Example 1: Looking for the name and E-mail of a person with the "web development" skills from your resume. Suppose the document structure is as follows: name sex birthday skill1 skill2 < / Skill2> ... Skilln ... ... Find all the name of the "Web Development" skill from the personal resume from the above structure The XSL document structure with e-mail is as follows:

Name e-mail

转载请注明原文地址:https://www.9cbs.com/read-1644.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.045, SQL: 9