|
XML Home
XML Tutorial About XML XML Viewers XML Editors XML Documents XML Syntax XML Elements XML Attributes XML with CSS XML with XSL XML Namespace XML Local Namespace XML Default Namespace XML Entities XML Creating Entities XML CDATA DTDDTD IntroductionDTD DOCTYPE DTD Internal DTD External DTD Combined DTD FPI DTD Elements DTD Element Operators DTD Attributes DTD Attribute Default Values DTD Attribute Types DTD General Entities DTD Parameter Entities DTD Embedded Images XSLTXSLT IntroductionXSLT Example XSLT Syntax XSLT <template> XSLT <apply-templates> XSLT <value-of> XSLT <for-each> XSLT <sort> XSLT <if> XSLT <choose> XPathXPath IntroductionXPath Location Path XPath Location Path - Absolute XPath Location Path - Relative XPath Attributes XPath Axis XPath Node Test XPath Predicate XPath Node Set XPath Comparison Operators XPath Boolean Operators XPath Number Operators XPath String Functions Tutorial Summary XHTML Tutorial AJAX Tutorial |
XPath PredicateIn our XPath expressions, we've learned that a location path consists of an axis, a node test, and optionally, one or more predicates. We've covered axes and node tests. Now let's look at predicates. Predicate SyntaxHere's where an XPath goes within our expression (in case you've forgotten!):
Predicate ExampleIn the following example, we're using the XSL "value-of" element to select a node. The "select" attribute of this element specifies an XPath expression. In the expression,
Predicate Expression TypesAn XPath predicate allows you to write very specific rules about the nodes you'd like to select when constructing your expressions. There are different types of expressions that you can use in your predicates. Here are the types of expressions you can use with your predicates:
Let's have a closer look at these expression types. Enjoy this website?
Oh, and thank you for supporting Quackit! |
FREE Hosting!With every domain name you register with ZappyHost, you get FREE (ad supported) hosting.PLUS you get:
Featured Template:
(Build your websites in minutes!) Got a MySpace Page?Get "www.yourname.com" for your MySpace page. Learn how >>. |