You are on page 1of 2

Location Paths [XPath §2] XPath Operators XSLT Functions [§12, §15]

Optional ‘/’, zero or more location steps, separated by ‘/’ Parentheses may be used for grouping. node-set document(object, node-set?)
node-set key(string, object)
Location Steps [XPath §2.1] Node-sets [XPath §3.3] string format-number(number, string, string?)
Axis specifier, node test, zero or more predicates

Axis Specifiers [XPath §2.2]


| [expr] / //
XSLT and XPath node-set current()
string unparsed-entity-uri(string)
Booleans [XPath §3.4]
ancestor::
ancestor-or-self::
following-sibling::
namespace::
<=, <, >=, > =, != and or Quick Reference string generate-id(node-set?)
object system-property(string)
attribute:: parent:: Numbers [XPath §3.5] boolean element-available(string)
child:: preceding:: -expr *, div, mod +, - boolean function-available(string)
descendant:: preceding-sibling::
Node Types [XPath §5]
descendant-or-self:: self:: XPath Core Function Library Root Processing Instruction
following::
Node Set Functions [XPath §4.1] Element Comment
Node Tests [XPath §2.3] number last() Attribute Text
name node() number position() Namespace
URI:name text() number count(node-set)
prefix:name comment() node-set id(object)
Object Types [§11.1, XPath §1]
* processing-instruction() string local-name(node-set?) boolean True or false
prefix:* processing-instruction(literal) string namespace-uri(node-set?) number Floating-point number
Abbreviated Syntax for Location Paths string name(node-set?) string UCS characters
(nothing) child:: String Functions [XPath §4.2] node-set Set of nodes selected by a path
string string(object?) Result tree XSLT only. Fragment of the result tree
@ attribute::
string concat(string, string, string*) fragment
// /descendant-or-self::node()/ boolean starts-with(string, string)
. self::node() boolean contains(string, string) Expression Context [§4, XPath §1]
.. parent::node() string substring-before(string, string) Context node (a node)
string substring-after(string, string) Context position (a number)
/ Node tree root
string substring(string, number, number?) Context size (a number)
Predicate [XPath §2.4] number string-length(string?) Variable bindings in scope
[expr] string normalize-space(string?) Namespace declarations in scope
string translate(string, string, string) Function library
Variable Reference [XPath §3.7] Mulberry Technologies, Inc.
$qname Boolean Functions [XPath §4.3] 17 West Jefferson Street, Suite 207 Built-in Template Rules [§5.8]
boolean boolean(object) Rockville, MD 20850 USA <xsl:template match="*|/">
Literal Result Elements [§7.1.1] boolean not(object) <xsl:apply-templates/>
Phone: +1 301/315-9631
Any element not in the xsl: namespace and not an extension boolean true() </xsl:template>
element Fax: +1 301/315-8285
boolean false() info@mulberrytech.com <xsl:template match="*|/" mode="m">
boolean lang(string) http://www.mulberrytech.com <xsl:apply-templates mode="m"/>
XSLT Number Functions [XPath §4.4] </xsl:template>
http://www.w3.org/TR/xslt number number(object?) <xsl:template match="text()|@*">
XPath number sum(node-set) <xsl:value-of select="."/>
number floor(number) </xsl:template>
http://www.w3.org/TR/xpath
number ceiling(number) <xsl:template
XSL-List number round(number) Mulberry match="processing-instruction()|comment()"/>
http://www.mulberrytech.com/xsl/xsl-list/
Technologies, Inc. Built-in template rule for namespaces is to do nothing

Mulberry Mulberry Mulberry


Technologies, Inc. © 2000 Mulberry Technologies, Inc. Technologies, Inc. © 2000 Mulberry Technologies, Inc. (20010522) Technologies, Inc. © 2000 Mulberry Technologies, Inc.
XSLT Elements Creating Attributes [§7.1.3] Sorting [§10] Key
<xsl:attribute name="{qname}" <xsl:sort select="string-expr" lang="{nmtoken}"
Stylesheet Element [§2.2] xsl:stylesheet Element
namespace="{uri-reference}">...</xsl:attribute> data-type="{text|number|qname-but-not-
<xsl:stylesheet version="1.0" id="id" version= Required attribute
ncname}" order="{ascending|descending}"
extension-element-prefixes="tokens" Named Attribute Sets [§7.1.4] version= Optional attribute
case-order="{upper-first|lower-first}"/>
exclude-result-prefixes="tokens" <xsl:attribute-set name="qname" {expr} Attribute value template. Text between
xmlns:xsl="http://www.w3.org/1999/XSL/ use-attribute-sets="qnames"> Variables and Parameters [§11]
xsl:attribute* </xsl:attribute-set>
any { and } is evaluated as an
Transform"> xsl:import*, top-level elements <xsl:variable name="qname" select="expr"/>
expression. Attribute value must
</xsl:stylesheet> <xsl:variable name="qname">...</xsl:variable>
Creating Text [§7.2] evaluate to indicated attribute type.
xsl:transform is a synonym for xsl:stylesheet <xsl:text disable-output-escaping="yes|no"> <xsl:param name="qname" select="expr"/> … Anything allowed in a template
Combining Stylesheets [§2.6] #PCDATA </xsl:text> <xsl:param name="qname">...</xsl:param> | Separates alternative values
<xsl:include href="uri-reference"/> Processing Instructions [§7.3] Using Values [§11.3] ? Zero or one occurrences
<xsl:import href="uri-reference"/> <xsl:processing-instruction name="{ncname}"> <xsl:copy-of select="expr"/> * Zero or more occurrences
...</xsl:processing-instruction> Passing Parameters [§11.6] + One or more occurrences
Whitespace Stripping [§3.4]
<xsl:strip-space elements="tokens"/> Creating Comments [§7.4] <xsl:with-param name="expr" select="expr"/> #PCDATA Character data
<xsl:comment>...</xsl:comment> <xsl:with-param name="expr">...</xsl:with-param>
<xsl:preserve-space elements="tokens"/> Attribute Value Types
Copying [§7.5] Keys [§12.2]
Defining Template Rules [§5.3] <xsl:key name="qname" match="pattern" 1.0 Literal value
<xsl:copy use-attribute-sets="qnames">
<xsl:template match="pattern" name="qname" boolean-expr Expression returning boolean value
...</xsl:copy> use="expr"/>
priority="number" mode="qname">
char Single character
xsl:param* followed by text, literal result elements Generating Text [§7.6.1] Number Formatting [§12.3]
and/or XSL elements </xsl:template> <xsl:decimal-format name="qname" expr Expression
<xsl:value-of select="string-expr"
disable-output-escaping="yes|no"/> decimal-separator="char" id XML name used as identifier
Applying Template Rules [§5.4]
grouping-separator="char" infinity="string" ncname XML name not containing a colon (:)
<xsl:apply-templates select="node-set-exp" Attribute Value Templates [§7.6.2] minus-sign="char" NaN="string"
mode="qname"/> node-set-expr Expression returning a node set
<element attribute="{expr}"/> percent="char" per-mille="char"
<xsl:apply-templates select="node-set-exp" number-expr Expression returning a number
Numbering [§7.7] zero-digit="char" digit="char"
mode="qname"> pattern XSLT pattern
<xsl:number level="single|multiple|any" pattern-separator="char"/>
(xsl:sort | xsl:with-param)* </xsl:apply-templates> prefix Namespace prefix
count="pattern" from="pattern" Messages [§13]
Overriding Template Rules [§5.6] value="number-expr" format="{string}" qname Namespace-qualified XML name
<xsl:message terminate="yes|no">
<xsl:apply-imports/> lang="{nmtoken}" comprising local part and optional
...</xsl:message>
letter-value="{alphabetic|traditional}" prefix
Named Templates [§6] Fallback [§15]
grouping-separator="{char}" qname-but-not- Namespace-qualified name comprising
<xsl:call-template name="qname"/>
grouping-size="{number}"/> <xsl:fallback>...</xsl:fallback> ncname local part and prefix
<xsl:call-template name="qname">
xsl:with-param* </xsl:call-template> Output [§16] token Meaning varies with context. See Rec.
Repetition [§8]
<xsl:for-each select="node-set-expr"> <xsl:output uri-reference Reference to Universal Resource
Namespace Alias [§7.1.1] Identifier
xsl:sort*, ...</xsl:for-each> method="xml|html|text|qname-but-not-ncname"
<xsl:namespace-alias result-prefix="prefix|#default"
version="nmtoken" encoding="string"
stylesheet-prefix="prefix|#default"/> Conditional Processing [§9] omit-xml-declaration="yes|no"
Creating Elements [§7.1.2] <xsl:if test="boolean-expr">...</xsl:if> doctype-public="string" doctype-system="string"
<xsl:element name="{qname}" <xsl:choose> standalone="yes|no" indent="yes|no"
namespace="{uri-reference}" <xsl:when test="expr">...</xsl:when>+ cdata-section-elements="qnames"
use-attribute-sets="qnames">...</xsl:element> <xsl:otherwise>...</xsl:otherwise>? media-type="string"/>
</xsl:choose>

Mulberry Mulberry Mulberry Mulberry


Technologies, Inc. © 2000 Mulberry Technologies, Inc. Technologies, Inc. © 2000 Mulberry Technologies, Inc. Technologies, Inc. © 2000 Mulberry Technologies, Inc. Technologies, Inc. © 2000 Mulberry Technologies, Inc.

You might also like