years-from-duration Returns an integer that represents the years datetimeduration component of the specified datetimeduration.. Name Descriptionmonths-from-duration Returns an integer th
Trang 1XSLT-Only Methods
XSLT-only functions may be called only from within an XSLT processor These methods are not callable from the Document Object Model (DOM)
Function Name Description
current The currentmethod returns a node set that contains the current
node as its only member
document The documentmethod provides a mechanism to retrieve data from
other XML resource from within the XSLT style sheet
element-available The element-availablemethod returns a true only if the
expanded-nameis the name of an instruction
format-number The format-numbermethod converts the first argument to a string
using the pattern specified by the second argument
function-available The function-availablemethod returns true if the function is
available in the function library
generate-id The generate-idmethod returns a string that identifies the node in
the node set argument that is first in the document order The node is identified uniquely
key The keymethod returns elements that have been market with an
<xsl:key>statement
node-set The node-setmethod converts a tree in a node set
system-property The system-propertymethod returns an object that represents the
value of the system property that has been identified by the name unparsed-entry-uri The unparsed-entity-urimethod returns declarations of
unparsed entities in the DTD of the source document
Accessor
The accessor family of methods provides information about the internal state of a node
node-name(node) The method returns the node-name of the specified node
nilled(node) This method returns a Boolean value as to whether or not the
argu-ment node has been nilled
data(item, ) This method returns a sequence of atomic values
base-uri() This method returns the value of the base-uriproperty of the base-uri(node) current or specified nodes
Trang 2The boolean family of methods provides operations that are associated with boolean (true/false) style operations
boolean(blarg) A boolean value for a string, number, or node set is returned not(blarg) The boolean value of the opposite of the boolean argument is
returned
true() The boolean value of trueis returned
false() The boolean value of falseis returned
Context
The context family of methods provides operations that are associated with location in the XML
position() The index position of the node that is currently being processed is
returned last() The last()method has the index position of the last node
current-dateTime() The current date and time are returned along with the appropriate
time zone
current-date() The current date is returned along with the appropriate time zone current-time() The current time is returned along with the appropriate time zone implicit-timezone() The implicit time zone is returned
default-collation() The default collation is returned
static-base-uri() The base-uriis returned
Datetime
The datetime family of methods returns information that is date- and time-related
dateTime(date,time) Creates a dateTimefrom the specified date and time
years-from-duration Returns an integer that represents the years (datetimeduration) component of the specified datetimeduration
Table continued on following page
367
XSLT Commands
Trang 3Name Description
months-from-duration Returns an integer that represents the months (datetimeduration) component of the specified datetimeduration hours-from-duration Returns an integer that represents the hours
(datetimeduration) component of the specified datetimeduration minutes-from-duration Returns an integer that represents the minutes (datetimeduration) component of the specified datetimeduration seconds-from-duration Returns an integer that represents the seconds (datetimeduration) component of the specified datetimeduration year-from-dateTime(datetime) Returns an integer that represents the year
compo-nent of the specified datetime month-from-dateTime(datetime) Returns an integer that represents the months
compo-nent of the specified datetime day-from-dateTime(datetime) Returns an integer that represents the daycomponent
of the specified datetime hours-from-dateTime(dateTime) Returns an integer that represents the hours
compo-nent of the specified datetime minutes-from-dateTime(dateTime) Returns an integer that represents the minutes
com-ponent of the specified datetime seconds-from-dateTime(dateTime) Returns an integer that represents the seconds
com-ponent of the specified datetime timezone-from-date(date) This method returns the timezonecomponent of the
argument
year-from-date(date) Returns an integer that represents the year
compo-nent of the specified date
month-from-date(date) Returns an integer that represents the month
compo-nent of the specified date
day-from-date(date) Returns an integer that represents the daycomponent
of the specified date
timezone-from-date(date) Returns the timezonefrom the dateargument hours-from-time(time) Returns an integer that represents the hours
compo-nent of the specified time
minutes-from-time(time) Returns an integer that represents the minutes
com-ponent of the specified time
seconds-from-time(time) Returns an integer that represents the seconds
com-ponent of the specified time
timezone-from-time(time) Returns the timezonefrom the timeargument
Trang 4Name Description
adjust-dateTime-to-timezone Returns the datetimeadjusted for the timezone (datetime, timezone) If no timezoneis specified, then the datetimeis
returned with no timezone adjust-date-to-timezone Returns the dateadjusted for the timezone If no (date,timezone) timezoneis specified, then the dateis returned with
no timezone adjust-time-to-timezone Returns the timeadjust for the timezone If no (time, timezone) timezoneis specified, then the timeis returned with
no timezone
Error/Trace
The error/trace family provides information regarding errors that are returned
error(error) error(error, description) error(error, description, error-object)
trace(value, label) This is used to debug queries
Node
The node family of functions returns information that is primarily information about the specified node
name() The name()method returns the name of the current node or the name(nodeset) first node in the node set passed to the method
local-name() The local-name()method returns the name of the current node or local-name(nodeset) the first node in the specified node set without the namespace prefix namespace-uri() The namespace-uri()method returns the namespace URI of the namespace-uri(nodeset) current node or the first node of the specified node set that is
passed to the method
lang(lang) The lang()method returns a boolean if the language of the
cur-rent node matches the specified language
root() The root()returns the root of the tree to which the specified node root(node) belongs to If no node is specified, the current node is used The
return value will typically be a document node
369
XSLT Commands
Trang 5The numeric family of functions performs operations that are numeric
number(arg) The number()method returns the numeric value of the
argu-ment The argument may be a boolean, string, or node set abs(num) The abs()method returns the absolute value of the argument ceiling(num) The ceiling()method returns the smallest integer that is
greater than the number specified
floor(num) The floor()method returns the largest integer less than the
number specified
round(num) The round()method returns the nearest integer to the number
specified
round-half-to-even(num) The round-half-to-even()method returns the nearest
whole number 1⁄2is rounded towards the nearest even number
Sequence
The sequence family of functions operates on arrays, or sequences, of lists
index-of((item1, item2, This method returns the positions within the sequence of items ), searchitem) that are within the argument listed as the searchitem
remove((item1, item2, This method returns a new sequence of items with the item at ), position) positionremoved from the list If the position does not exist
within the list of items, the original list is returned
empty(item1, item2, ) This method returns true if the value of the arguments is an
empty sequence; otherwise, it returns false
exists(item1, item2, This method returns a true if the value of the arguments is not
distinct-values((item1, This method returns distinct values from the list of items item2, ), collation)
insert-before(item1, This method returns a new sequence with the item list and the item2, ), position, value of the insertsargument at the position specified inserts)
reverse((item1, This method returns a sequence of items that is reversed from item2, )) the specified list of items
Trang 6Name Description
subsequence((item1, item2, This method returns a sequence of items starting at the posi- ), start, length) tion specified at the starting point and for the length specified unordered(item1, item2, This method returns a list of items in an implementation
String
The string family of functions performs operations on strings
string(argument) This method returns the string value of the argument This
argument may be a number, boolean, or node set
codepoints-to-string This method returns a string from a sequence of code (int1, int2, ) points
string-to-codepoints This method returns a list of code points from a string
(string) codepoint-equal(item1, This method returns true if the value of item1and item2are item2) equal based on the rules of the unicode code point collation compare(item1, item2) This method returns a value of -1 if item1is less than item2, 0, compare(item1, item2, if item1is equal to item2, or 1 if item1is greater than item2 collation) This comparison is based on the rules of collation used
concat(string1, This method returns the concatenation of the strings
string-join(string1, This method returns a string created by concatenating the string2, ), separator) string arguments and uses the separatorargument
substring(string, start) This method returns a string based on the supplied string, substring(string, start, which starts at the supplied starting point and is based on the length) supplied length If no length is supplied, a substring from the
start position to the end of the string is returned
string-length() This method returns the length of the specified string If there string-length(string) is no string passed as an argument, the string value of the
cur-rent node is used
normalize-space() This method removes the trailing and leading spaces from the normalize-space(string) string used All internal sequences of white space are replaced
with one space If no string is specified, the string value of the current node is used
Table continued on following page
371
XSLT Commands
Trang 7Name Description
normalize-unicode() This method indicates whether or not the serialization should
convert the serialized output to Unicode
upper-case(string) This method converts the supplied string argument to
uppercase
lower-case(string) This method converts the supplied string argument to
lowercase
translate(string1, This method converts string1by replacing the values in string2, string3) string2with the values in string3
escape-uri(stringurl, This method returns an escaped version of the string URI escres) specified The escresargument is a boolean
contains(string1, This method returns true if string1contains the value string2) specified in string2
starts-with(string1, This method returns true if string1starts with string2 string2) Otherwise, the method returns a false
ends-with(string1, This method returns true if string1ends with string2 string2) Otherwise, the method returns a false
substring-before(string1, This method returns the start of string1before string2
substring-after(string1, This method returns the end of string1after string2occurs
matches(string, pattern) This method returns true if the stringargument matches the
specified pattern
replace(string, pattern, This method returns a string that is made by replacing the replacement) specified pattern with the replacement string
tokenize(string, This method tokenizes the specified string based on the patternstring) patternstring
URI
The URI family of functions provides support for URI resolution
resolve-uri(relative, This method will return the URI given a base URI and a base) relative URI The two are put together and a result is returned
Trang 8Index
Trang 10Index
A
abort()method (XMLHttpRequest object), 92
abs(num)function (XSLT), 370 activating Ajax.NET Pro library, 163 Active Server Pages (ASP), 3 Adaptive Path, 8
adding classes, 274–275 namespaces, 274–275 projects to solutions, 180–181 adjust-dateTime-to-timezone (datetime, timezone)function (XSLT), 369
adjust-date-to-timezone(datetime, timezone)function (XSLT), 369 adjust-time-to-timezone(datetime, timezone)function (XSLT), 369 Ajax
advantages of, 6–7 Atlas support, 249, 251 browser support, 8 defined, 1, 6 development history, 7 DHTML/DOM support, 8 JavaScript, 8
JavaScript Object Notation (JSON), 8
problems it won’t solve, 9 processing, 6
UI (user interface), 7 user context, 7 user experience, 5 XML, 8, 122–123 XMLHttpRequestobject, 8 AjaxHandlerFactory, 191 Ajax.NET Pro converters, 193–194 Ajax.NET Pro library
activating, 163 Ajax/AjaxSettingsSectionHandler cs, 188–191
AjaxHandlerFactory, 191 AjaxPro.AjaxMethod()attribute, 163–164, 191–192
Compiled Library, 160 downloading, 180 HTTP page handlers, 182–183 JavaScript, 192
Library Source Code, 160, 180 preparing applications to use it, 160–161, 174–175, 180–182
references, 160–161 registering page class, 163, 183–186 using in applications, 161–164 Web.Configsettings, 182, 186–188
Trang 11AjaxPro.AjaxMethod()attribute, 163–164,
191–192
alert()function (JavaScript), 13–14
alertstatements, 333
Anthem.NET server-side framework
client functions, 237–239
complex controls, 234–235
custom attributes, 235–237
Hello World example, 232–233
invoke page method, 239–242
micro-content, 242–244
server exceptions, 244–246
setup, 231–232
appending nodes, 63
apply-importselement (XSLT), 363
apply-templateselement (XSLT), 363
April CTP (Atlas project), 249
architectural distinctions in server-side
frameworks, 203–207
arguments (JavaScript functions), 34
Arrayclass, 267
arrays in JavaScript, 38
ASP (Active Server Pages), 3
ASP.NET
browser compatibility, 132
callbacks
browser support, 132–133
ClientScriptobject, 134–135
defined, 127
DetailsViewcontrol, 132
enabling pages for callbacks, 145–146
error handling, 141–144
examples, 140–141, 150–154
GridViewcontrol, 129–131
ICallbackContainerinterface,
133, 154–156
ICallbackEventHandlerinterface,
133–137
initiating the asynchronous process from the
browser, 138
limitations on returning complex data in XML,
154
obtaining a callback reference, 135–136 receiving and processing the results, 138–150
TreeViewcontrol, 128–129 controls
DetailsView, 132 GridView, 129–131 TreeView, 128–129 debugging
breakpoints, 331–332 ease of, 329–330 Visual Studio NET 2005, 330–332 development environment, 2–5 Easy Search component, 9 integration with Atlas authentication, 311–313, 315–319 authorization, 311, 314, 319–321 Drag and Drop implementation, 328 membership service, 314
profiles, 311, 314, 322–328 roles, 311, 314, 319–321 Web Parts, 314
interfaces ICallbackContainer, 133, 154–156 ICallbackEventHandler, 133–137 XML, 154
ASP.NET Forums, 283 Asynchronous Client Script Callbacks
See callbacks
asynchronous execution, 170–172
Asynchronous JavaScript And XML See Ajax
asynchronous operations Atlas project, 251 XMLHttpRequestobject, 82–84, 88–92 Atlas project
Ajax support, 249, 251 April CTP, 249
asynchronous operations, 251 blogs, 283
classes adding, 274–275 Array, 267