0% found this document useful (0 votes)
23 views2 pages

XSLT QRef

Uploaded by

David Perez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views2 pages

XSLT QRef

Uploaded by

David Perez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

2SWLRQDOµ/¶]HURRUPRUHlocation stepsVHSDUDWHGE\µ/¶ 3DUHQWKHVHVPD\EHXVHGIRUJURXSLQJ 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 specifiernode test]HURRUPRUHpredicates

Axis Specifiers [XPath §2.2]


| [expr] / //
XSLT and XPath node-set current()
node-set 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::
descendant-or-self:: self:: Node Types [XPath §5]
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() Object Types [§11.1, XPath §1]
node-set id(object)
* processing-instruction() string local-name(node-set?) boolean 7UXHRUIDOVH
prefix:* processing-instruction(literal) string namespace-uri(node-set?) number )ORDWLQJSRLQWQXPEHU
Abbreviated Syntax for Location Paths string name(node-set?) string 8&6FKDUDFWHUV
QRWKLQJ  child:: String Functions [XPath §4.2] node-set 6HWRIQRGHVVHOHFWHGE\DSDWK
@ attribute:: string string(object?) Result tree ;6/7RQO\)UDJPHQWRIWKHUHVXOWWUHH
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 DQRGH 
/ 1RGHWUHHURRW string substring-after(string, string) Context position DQXPEHU 
string substring(string, number, number?) Context size DQXPEHU 
Predicate [XPath §2.4] number string-length(string?) Variable bindingsLQVFRSH
[expr] string normalize-space(string?) Namespace declarationsLQVFRSH
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/>
$Q\HOHPHQWQRWLQWKHxsl:QDPHVSDFHDQGQRWDQH[WHQVLRQ Phone: +1 301/315-9631
boolean true() Fax: +1 301/315-8285 </xsl:template>
HOHPHQW
boolean false() [email protected] <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="."/>
http://www.w3.org/TR/xpath number floor(number) </xsl:template>
number ceiling(number) <xsl:template
XSL-List number round(number)
http://www.mulberrytech.com/xsl/xsl-list/ Mulberry match="processing-instruction()|comment()"/>
Technologies, Inc. %XLOWLQWHPSODWHUXOHIRUQDPHVSDFHVLVWRGRQRWKLQJ

Mulberry Mulberry Mulberry


Technologies, Inc.  © 2000 Mulberry Technologies, Inc. Technologies, Inc. © 2000 Mulberry Technologies, Inc. (20001130) Technologies, Inc.  © 2000 Mulberry Technologies, Inc.
XSLT Elements Creating Attributes [§7.1.3] <xsl:sort select="string-expr" lang="{nmtoken}" Key
<xsl:attribute name="{qname}" data-type="{text|number|qname-but-not-
Stylesheet Element [§2.2] xsl:stylesheet (OHPHQW
namespace="{uri-reference}">...</xsl:attribute> ncname}" order="{ascending|descending}"
<xsl:stylesheet version="1.0" id="id" case-order="{upper-first|lower-first}"/> version= 5HTXLUHGDWWULEXWH
extension-element-prefixes="tokens" Named Attribute Sets [§7.1.4] version= 2SWLRQDODWWULEXWH
exclude-result-prefixes="tokens" <xsl:attribute-set name="qname" Variables and Parameters [§11]
xmlns:xsl="http://www.w3.org/1999/XSL/ use-attribute-sets="qnames"> <xsl:variable name="qname" select="expr"/> {expr} $WWULEXWHYDOXHWHPSODWH7H[WEHWZHHQ
Transform"> xsl:import*,WRSOHYHOHOHPHQWV xsl:attribute* </xsl:attribute-set> <xsl:variable name="qname">...</xsl:variable> DQ\^DQG`LVHYDOXDWHGDVDQ
</xsl:stylesheet> H[SUHVVLRQ$WWULEXWHYDOXHPXVW
Creating Text [§7.2] <xsl:param name="qname" select="expr"/>
HYDOXDWHWRLQGLFDWHGDWWULEXWHW\SH
xsl:transformLVDV\QRQ\PIRUxsl:stylesheet <xsl:text disable-output-escaping="yes|no"> <xsl:param name="qname">...</xsl:param>
… $Q\WKLQJDOORZHGLQDWHPSODWH
Combining Stylesheets [§2.6] #PCDATA </xsl:text> Using Values [§11.3] | 6HSDUDWHVDOWHUQDWLYHYDOXHV
<xsl:include href="uri-reference"/> Processing Instructions [§7.3] <xsl:copy-of select="expr"/>
? =HURRURQHRFFXUUHQFHV
<xsl:import href="uri-reference"/> <xsl:processing-instruction name="{ncname}"> Passing Parameters [§11.6] * =HURRUPRUHRFFXUUHQFHV
...</xsl:processing-instruction> <xsl:with-param name="expr" select="expr"/>
Whitespace Stripping [§3.4] + 2QHRUPRUHRFFXUUHQFHV
Creating Comments [§7.4] <xsl:with-param name="expr">...</xsl:with-param>
<xsl:strip-space elements="tokens"/> #PCDATA &KDUDFWHUGDWD
<xsl:comment>...</xsl:comment> Keys [§12.2]
<xsl:preserve-space elements="tokens"/>
Copying [§7.5] <xsl:key name="qname" match="pattern" Attribute Value Types
Defining Template Rules [§5.3] use="expr"/> 1.0 /LWHUDOYDOXH
<xsl:copy use-attribute-sets="qnames">
<xsl:template match="pattern" name="qname"
priority="number" mode="qname">
...</xsl:copy> Number Formatting [§12.3] boolean-expr ([SUHVVLRQUHWXUQLQJERROHDQYDOXH
xsl:param*IROORZHGE\WH[Wliteral result elements Generating Text [§7.6.1] <xsl:decimal-format name="qname" char 6LQJOHFKDUDFWHU
DQGRU;6/HOHPHQWV</xsl:template> <xsl:value-of select="string-expr" decimal-separator="char" expr ([SUHVVLRQ
disable-output-escaping="yes|no"/> grouping-separator="char" infinity="string"
Applying Template Rules [§5.4] id ;0/QDPHXVHGDVLGHQWLILHU
minus-sign="char" NaN="string"
<xsl:apply-templates select="node-set-exp" Attribute Value Templates [§7.6.2] percent="char" per-mille="char" ncname ;0/QDPHQRWFRQWDLQLQJDFRORQ  
mode="qname"/> <element attribute="{expr}"/> zero-digit="char" digit="char" node-set-expr ([SUHVVLRQUHWXUQLQJDQRGHVHW
<xsl:apply-templates select="node-set-exp"
Numbering [§7.7] pattern-separator="char"/> number-expr ([SUHVVLRQUHWXUQLQJDQXPEHU
mode="qname">
(xsl:sort_xsl:with-param)* </xsl:apply-templates>
<xsl:number level="single|multiple|any" Messages [§13] pattern ;6/7SDWWHUQ
count="pattern" from="pattern" <xsl:message terminate="yes|no"> prefix 1DPHVSDFHSUHIL[
Overriding Template Rules [§5.6] value="number-expr" format="{string}" ...</xsl:message> qname 1DPHVSDFHTXDOLILHG;0/QDPH
<xsl:apply-imports/> lang="{nmtoken}"
Fallback [§15] FRPSULVLQJORFDOSDUWDQGRSWLRQDO
letter-value="{alphabetic|traditional}" SUHIL[
Named Templates [§6] <xsl:fallback>...</xsl:fallback>
grouping-separator="{char}"
<xsl:call-template name="qname"/> qname-but-not- 1DPHVSDFHTXDOLILHGQDPHFRPSULVLQJ
grouping-size="{number}"/> Output [§16]
<xsl:call-template name="qname"> ncname ORFDOSDUWDQGSUHIL[
xsl:with-param* </xsl:call-template> Repetition [§8] <xsl:output
token 0HDQLQJYDULHVZLWKFRQWH[W6HH5HF
<xsl:for-each select="node-set-expr"> method="xml|html|text|qname-but-not-ncname"
Namespace Alias [§7.1.1] version="nmtoken" encoding="string" uri-reference 5HIHUHQFHWR8QLYHUVDO5HVRXUFH
xsl:sort*, ...</xsl:for-each>
<xsl:namespace-alias result- omit-xml-declaration="yes|no" ,GHQWLILHU
prefix="prefix|#default" Conditional Processing [§9] doctype-public="string" doctype-system="string" 
stylesheet-prefix="prefix|#default"/> <xsl:if test="boolean-expr">...</xsl:if> standalone="yes|no" indent="yes|no"
Creating Elements [§7.1.2] <xsl:choose> cdata-section-elements="qnames"
<xsl:element name="{qname}" <xsl:when test="expr">...</xsl:when>+ media-type="string"/>
namespace="{uri-reference}" <xsl:otherwise>...</xsl:otherwise>?
use-attribute-sets="qnames">...</xsl:element> </xsl:choose>
Sorting [§10]

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