XPath Quick Reference

Size: px
Start display at page:

Download "XPath Quick Reference"

Transcription

1

2 XPath Quick Reference Node Types Nodes can be of the following types: NodeType root element attribute text cornrnent processing narnespace Name Element name Attribute name Processing instruction target Namespace prefix String Value Concatenation of ali text nodes in the document Concatenation of ali text nodes descended from the element Attribute value Text Text held within the comment Text in the processing instruction after the space after the targetname Namespace URI bject Types Values in XSLT can be one of the following five types: bject Type boolean number Description true or false A floating-point number: a double-precision 64-bit format IEEE 754 value Table continued on following page

3 Appendix A bject Type string node set result tree fragment Description A sequence of XML characters An unordered collection of nodes The root node of a generated node tree The various object types can be converted to each other by the following rules. bject Boolean Number String boolean 1 if the boolean is true, if the boolean is false, true' if the boolean is true, 'false' if the boolean is false number false ifthe number is or NaN, otherwise true A string version of the number with no leading or trailing zeros; 'NaN' if the number is NaN,, Infinity' if the number is infinity, and '-Infinity' ifthe number is negative infinity string false ifthe string is an empty string, otherwise true The number held by the string, as long as it is a valid XPath number (which doesn't include exponents or grouping separators) ; otherwise NaN node set true if the node set holds nodes; false ifthe node set is empty The result of converting the string value of the first node in the node set to a number The string value of the first node in the node set result tree fragment true The result of converting the string value of the re suit tree fragment to a number The string value of the re suit tree fragment Booleans, numbers, and strings cannot be converted to node sets or result tree fragments. 694

4 Paths XPath Quick Reference Paths are made up of a number of steps, separated by / s. Each step is made up of an optional axis (defaults to child), a node test, and any number of predicates (held in square brackets). Axes Axes dictate the relationship between the context node and the selected nodes. The direction of an axis determines how the posi tion () of a node is calculated - forward axes look at document order, reverse axes look at reverse document order. Axis self ehild parent attribute deseendant deseendantor-self aneestor aneestor-or-self following-sibling preeeding-sibling following preeeding namespaee Direction Forward Forward Reverse Forward Forward Forward Reverse Reverse Forward Reverse Forward Reverse Forward Description Selects the context node itself Selects the children of the context node Selects the parent of the context node Selects the attributes of the context node Selects the descendants of the context node at any level Selects the descendants of the context node, and the context node itself Selects the ancestors of the context node Selects the ancestors of the context node, and the context node itself Selects the siblings of the context node that follow the context node in document order Selects the siblings of the context node that precede the context node in document order Selects the nodes (asi de from attribute and namespace nodes) that follow the context node in document order and that are not descendants of the context node Selects the nodes (asi de from attribute and namespace nodes) that precede the context node in document order and that are not ancestors of the context node Selects the namespace nodes on the context node 695

5 Appendix A Node Tests Node tests match different kinds of nodes as follows: Node Test node() * name text( ) comment () processing-instruction() Description Matches nodes of all types Matches elements with any name (or attributes if you're using the attribute axis) Matches elements with the given name (or attribute if you're using the attribute axis) Matches text nodes Matches comment nodes Matches processing instruction nodes Matches processing instruction nodes with the given target Abbreviated Syntax You can use several abbreviations in XPath expressions, as described in the following table. Abbreviation Full Equivalent self: :node() parent: :node () processinginstruction('target') /descendant-orself: :node () / attribute: : Description The context node The parent of the context node SuppIies quick access to descendants of the context node Shortens expressions that access attributes perators The operators in XPath can be spiit into four groups: o Logical operators Comparisons Numerical operators N ode set operators 696

6 XPath Quick Reference The precedence of the operators (from lowest to highest) is as follows: 1. or 2. and 3. =,!= 4. <=,<,>=,> 5. +, - 6. *,div,mod 7. unary - 8. Logical perators perator or and Description true if either operand is true when converted to booleans; the right operand is not evaluated if the Ieft operand is true true if both operands are true when converted to booleans; the right operand is not evaluated ifthe Ieft operand is false Comparisons perator Description Equal to!= Not equal to < Less than <= Less than or equal to > Greater than >= Greater than or equal to Comparisons between node sets and values are true if the comparison is true for the string value of any node in the node set.. 697

7 Appendix A The numeric comparisons «, <=, >, and >=) can only be used to do numeric comparisons - you can't use them to test whether one string is alphabetically less than another string. Numerical perators perator + * div mod unary - Description Addition Subtraction Multiplication Floating-point division Remainder from integer division Negation Node Set perator perator Description Creates a union of two node sets Functions XPath and XSLT together define the following functions: boolean() boolean boolean (object) See also: string (), number () Converts the argument to a boolean value (either true or false). Usually this is done automatically, for example in test attributes. ceiling() number ceiling (number) See also: floor (), round () Rounds the argument up to the nearest integer. For negative numbers, this means rounding nearer to 0, so ceiling (-1. 5) is

8 XPath Quick Reference concat() string concat (string, string+) Concatenates the strings passed as arguments into a single string. contains() boolean contains (string, string) See also: starts-with () Returns true if the string passed as the first argument contains the string passed as the second argument or if the second argument is an empty string, and false otherwise. count() number count (node-set) See also: last ( ), posi tion (), <xsl: number> Counts the number of nodes in the node set passed as the argument. current() node-set current ( ) See also: the path. Returns the current node - the node that's current1y being processed within the <xsl: for-each> or <xsl: template> as opposed to the context node, which is the node currently being looked at within an XPath. document() node-set document (object, node-set?) If the first argument is a string, returns the node found at the URL specified by that string (usualiy the root node of a document). The URL is resolved relative to the location of the file containing the first node in the node set passed as the second argument (which is usualiy used to resolve the URL relative to the source document). If the second argument is- missing, the URL is resolved relative to the stylesheet itself. If the first argument is a node set, then the result is a node set containing ali the nodes that are retrieved by calling the document () function with the string values of the nodes in the node set. element-available( ) boolean element-available (string) See also: function-available ( ), <xsl: fallback> 699

9 Appendix A Returns true if the processor supports the extension element or new XSLT instruction named by the string passed as the argument. The string should be a qualified name, with a prefix. false() boolean false ( ) See also: true ( ), boolean ( ) Returns false. floor number floor (number) See also: ceiling (), round () Rounds the number down to the nearest integer. If the number is negative, then it gets rounded away from zero, so floor (-1.5) returns -2. format-number( ) string format-number (number, string, string?) See also: number (), <xsl: decimal-format>, <xsl: number> Returns the number passed as the first argument formatted according to the format pattern passed as the second argument. The format pattern usually contains # to mean an optional digit, to indicate a required digit,. to indicate the decimal point, and, to indicate a grouping separator. For example, format-number (1234.5, '#, ##0.00' ) returns 1, If the third argument is specified, it gives the name of a decimal format, declared with the <xsl: decimal-format> element, which can de fine other characters to be used instead of #,, " and function-avai lable() boolean function-available (string) See also: element-available ( ) Returns true if the processor supports the function named by the argument string. The string usually includes a prefix to test for the availability of extension functions. generate-id( ) string generate-id (node-set?) Returns an ID for the first node in the node set passed as the argument which is both unique and a valid XML ID. If no argument is given, it returns a unique ID for the context node. The unique IDs are not stable - they are different from processor to processor, and even for the same processor operating over the same stylesheet with the same source XML document. 700

10 XPath Quick Reference id node-set id (object) See also: key ( ) Retums the nodes with the XML IDs specified by the argument. If the argument is a string, then it's split up at the whitespace, and the function retums ah the nodes in the current document that have any of the IDs. If the argument is a node set, the same is done but with the string values of each of the nodes in the node set. You have to have declared an attribute as an ID function within a DTD for the id ( ) attribute to work, and the context node must be in the same document as the nodes that you want to retrieve. key(} node-set key(string, object) See also: id (), <xsl: key> Retums the nodes that are indexed by the value specified by the second argument in the key named by the first argument. If the second argument is a node set, then ah the nodes with any of the values are retumed. You have to have declared the key with an <xs 1 : key> declaration, and the context node must be in the same document as the nodes that you want to retrieve. lang boolean lang (string) Retums true if the language of the context node (as specified with the xml : lang attribute) matches the language specified by the argument. This test is aware of sub languages and is case-insensitive, so for example lang ( 'en ') would retum true even ifthe context node's language was specified as EN-US. last number last () See also: posi tion (), count ( ) Retums the index of the last node in the list that's currently being looked at (or the number of nodes that are currently being looked at, depending on how you like to view it). local-name( } string local-name (node-set?) See also: name (), namespace-uri () Retums the local name of the first node in the node set - the part of the name after any prefix that there might be. If no argument is passed, then retums the local name of the context node. 701

11 Appendix A name() string name (node-set?) See also: local-name (), namespace-uri () Returns the fub name of the first node in the node set, including the prefix for its namespace as declared in the source document. If no argument is passed, then returns the fub name of the context node. namespace-uri( ) string namespace-uri (node-set?) See also: name ( ), local-name ( ) Returns the namespace URI for the first node in the node set, or an empty string if the node is in no namespace. If no argument is passed, then returns the namespace URI of the context node. normalize-space( ) string normalize-space (string?) See also: string (), <xsl: strip-space> Returns the argument string with leading and trailing whitespace stripped, and any sequences of whitespace converted to single spaces. If no argument string is specified, then it returns the normalized string value of the context node. not() boolean not (boolean) See also: true ( ), false (), boolean () Returns false if the argument is true, and true if the argument is false. number() number number (object?) See also: string (), boolean (), format-number (), <xsl :number> Converts the argument to a number; if no argument is given, returns the numerical value of the context node. You don't usually need to use this function because values are converted to numbers automatically if they need to be numbers. position() number posi tion ( ) See also: last (), count (), <xsl :number> 702

12 XPath Quick Reference Returns the position of the context node amongst the list of nodes that are currentiy being looked at. Unlike the numbers generated through <xsl: number>, the posi tion () function depends on the order in which nodes are processed regardless of their original order in the source document. round number round (number) See also: floor (), cei ling () Rounds the argument number to the nearest integer. If the number is exacdy between two integers, then it rounds up (the same as cei ling ( )). starts-with( ) boolean starts-with (string, string) See also: contains ( ) Returns true if the first argument string starts with the second argument string, or if the second argument string is empty, and returns false otherwise. stringe) string string(object?) See also: boolean ( ), number ( ) Converts the argument to a string; if no argument is given, returns the string value of the context node. You don't normally need to use this function because values are converted to strings automatically if they need to be strings. string-iength( ) number string-length (string?) See also: substring () Returns the length of the string passed as the argument. If no argument is passed, then returns the length of the string value of the context node. substring( ) string substring (string, number, number?) See also: substring-before (), substring-after () Returns a sub string of the first argument string starting from the number passed as the second argument and a number of characters long equal to the third argument number. If the third argument isn't specified, then it returns the rest of the string, to the last character. The first character in the string is numbered

13 Appendix A substring-after( ) string substring-after (string, string) See also: substring-before (), substring () Retums the substring of the first argument string that occurs after the second argument string. If the second string is not contained in the first string, or if the second string is empty, then it retums an empty string. substring-before( ) string substring-before (string, string) See also: substring-after (), substring () Retums the substring of the first argument string that occurs before the second argument string. If the second string is not contained in the first string, or if the second string is empty, then it retums an empty string. sum() number sum(nade-set) Retums the sum of the values of the nodes in the node set. If any of the nodes' values isn't numeric, then this function retums NaN. Ifthe node set is empty, it retums. system-property( ) abject system-property (string) See also: element-available ( ), function-available ( ) Supplies information about the processor that's being used to run the stylesheet. The argument string specifies the kind of information that's retumed. There are three standard arguments: o xsl: vers ion - the version of XSLT supported by the processor (usually 1. in current XSLT processors) xsl :vendor - the name ofthe vendor ofthe XSLT processor xsl : vendor-url - a URL for the vendor of the XSLT processor Processors can support their own system properties. For example, MSXML supports the system property msxs 1 : ver sion which returns the version of MSXML that' s being used. translate( ) 704 string translate (string, string, string) Returns the first argument string with all occurrences of the characters in the second argument string replaced by their corresponding characters in the third string. If a character in the second string doesn't have a corresponding character in the third string, then the character is deleted from the first string.

14 XPath Quick Reference true() boolean true ( ) See also: false ( ), boolean ( ) Retums true. unparsed-entity-uri( ) string unparsed-enti ty-uri (string) Retums the URI of the unparsed entity whose name is passed as the argument. Unparsed entities are declared within DTDs as a way of pointing to non-xml files, but they aren't very common nowadays. 705

15

16 XSLT Quick Reference XSLT Elements This section describes each of the XSLT 1.0 elements in alphabetical order. The syntax for each element is shown, followed by a description. Within the syntax descriptions, attributes that are attribute value templates are indicated by curly braces ( { } ) within the attribute value. Required attributes and default values are shown in bold. xsl:apply-imports <xsl:apply-imports /> See also: <xsl: import>, <xsl: apply-templates> The <xsl: apply-imports> instruction tells the XSLT processor to take the current node and try to find a template in an imported stylesheet that (a) is in the same mode as the current template and (b) matches the current node. If the processor locates a template, it uses that template to process the current node; otherwise it uses the default templates. The <xsl: apply-imports> instruction must be within an <xsl: template> element, and is not allowed as a descendant of an <xsl: for-each> - the current node at the point at which the <xsl: apply-imports> instruction is used must be the same as the current node of the template it's in.

17 Appendix B xsl :apply-templates <xsl:apply-templates select="node-set-expression" mode="qualified-name"> (xsl:sort I xsl:with-param)* </xsl:apply-templates> See also: <xsl: sort>, <xsl :with-param>, <xsl: template>, <xsl: call-template>, <xsl:for-each>,<xsl:apply-imports> The <xsl: apply-templates> instruction tells the processor to gather together a set of nodes and to process each of the nodes by finding a template that matches it and using that template. The nodes that the processor applies templates to are selected by the path held in the select attribute. If the select attribute is missing, then the processor applies templates to the child nodes of the current node. The nodes are processed in the order determined by the <xsl : sort> elements that are contained by the <xsl: apply-templates> instruction. See the description of <xsl: sort> for details. If there are no <xsl: sort> elements within the <xsl: apply-templates> instruction, the processor goes through the nodes in document order (the order in which they appeared in their document). The only templates that can match the nodes to which the processor applies templates are those whose mode attribute has the same value as the value of the mode attribute on the <xsl : applytemplates>. If the <xsl: apply-templates> instruction doesn't have a mode attribute, then the only templates that are applied are those without a mode attribute. The templates that are used are passed the parameters specified by the <xsl: wi th-param> elements within the <xsl: apply-templates> instruction. See the description of <xsl :wi th-param> for details. xsl:attribute <xsl:attribute name=" {qualified-name} " namespace=" {namespace-uri} "> template </xsl:attribute> See also: <xsl: attribute-set>, <xsl: element> The <xsl: attribute> instruction creates an attribute. When adding attributes to an element, any <xsl: attribute> instructions must come before any instructions that add content to the element. The <xsl: attribute> instruction can also be included within an <xsl: attribute-set> element; see the description of <xsl: attribute-set> for details. 708

18 XSLT Quick Reference The name of the attribute that's created is determined by its name and namespace attributes. The name attribute gives the qualified name for the attribute and the namespace attribute gives the namespace for the attribute. If the name held in the name attribute doesn't include a prefix and the namespace attribute has a value, then the generated attribute will be given a prefix generated by the XSL T processor. If the namespace attribute is missing, then the qualified name specified by the name attribute is used to identify the namespace for the attribute - the namespace associated with the qualified name's prefix. If the qualified name doesn't have a prefix, then the attribute is in no namespace. Both the name and namespace attributes are attribute value templates, so their values can be calculated on the fiy. The value of the created attribute is the re suit of processing the content of the <xs 1 : a t tr ibu te> instruction. The instructions within the <xsl: attribute> must not generate any nodes aside from text nodes. xsl :attri bute-set <xsl:attribute-set name="qualified-name" use-attribute-sets= " list-of-qualified-names" > xsl:attribute* </xsl:attribute-set> See also: <xsl: at tribute>, <xsl : element>, <xsl : copy>, xsl: use-attribute-sets The <xsl: attribute-set> declaration defines a set of attributes that can then au be added to an element at once through the use-attribute-sets attribute on <xsl: element> or <xsl: copy>, or the xsl :use-attribute-sets attribute on literal result elements. It is located at the top level of the stylesheet, as a child of <xsl: stylesheet>. The name attribute holds the qualified name of the attribute set, by which it can be referred to later ono The <xsl: attribute-set> element contains a number of <xsl: attribute> elements. The usea t tribute-sets attribute contains a space-delimited list of the qualified names of other attribute sets. The attributes from the used attribute sets are added to this one. xsl :call-template <xsl:call-template name="qualified-name"> xsl:with-param* </xsl:call-template> See also: <xsl: template>, <xsl: apply-templates> 709

19 Appendix 8 The <xsl: call-template> instruction calls a template by name. The name of the called template is held in the name attribute. The <xs 1 : wi th -par am> elements held within the <xs 1 : calltemplate> are used to define parameters that are passed to the template. See the description of <xs 1 : wi th -param> for more details. xsl:choose <xsl:choose> (xsl:when+, xsl:otherwise?) </xsl:choose> See also: <xsl :when>, <xsl: otherwise>, <xsl: if> The <xsl: choose> instruction is a conditional construct that causes different instructions to be processed in different circumstances. The XSLT processor processes the instructions held in the first <xsl :when> element whose test attribute evaluates as true. Ifnone ofthe <xsl :when> elements' test attributes evaluate as true, the content of the <xsl: otherwise> element, if there is one, is processed. xsl:comment <xsl:comment> template </xsl:comment> See also: <xsl :processing-instruction> The <xsl: comment> instruction generates a comment node. The instructions within the <xsl: comment> element determine the value of the comment. These instructions must not generate any nodes apart from text nodes, and the text nodes that they generate must not contain two hyphens next to each other ('--'), as this sequence isn't allowed in comments. xsl:copy <xsl:copy use-attribute-sets="list-of-qualified-names"> template </xsl:copy> 710 See also: <xsl: copy-of>, <xsl: attribute-set> The <xs 1: copy> instruction creates a shallow copy of the current node. For most nodes, this is equivalent to a deep copy, but for element and root nodes it's slightly different.

20 XSLT Quick Reference If the current node is an element or root node, the children of the copy are the results of processing the contents of the <xs 1 : copy> instruction. If the current node is an element, then any namespace nodes from the original element are copied over. The attributes from the attribute sets named in useattribute-sets are added to the copied element (along with any attributes that might be added through <xsl: attribute> instructions within the <xsl: copy». xsl :copy-of <xsl:copy-of select.="expression" /> See also: <xsl: copy>, <xsl :value-of> The <xsl: copy-of> instruction creates a deep copy ofwhatever is selected by the expression held in its select attribute. If the expres sion evaluates to a string, number, or boolean, then it creates a text node whose value is that value. If the expres sion evaluates to a node set or a re suit tree fragment, then it creates a deep copy of the nodes in the node set or the result tree fragment. This deep copy includes child nodes, attributes, and namespace nodes. xsl :decimal-format <xsl:decimal-format name="qualified-name" digit="character" zero-digit="character" decimal-separator="character" grouping-separator="character" minus-sign=licharacter ll pattern-separator="character" percent="character" per-mille="character" infinity="string" NaN="string" /> See also: format-number () <xs 1 : dec imal-forma t> elements de fine methods of interpreting the format pattern strings that are used as the second argument of the format-number () function. They live at the top level of the stylesheet, as children of <xsl : stylesheet>. There can be many decimal formats, but they must ali have different names, specified by the name attribute. If the name attribute is missing, the decimal format is used as the default decimal format. When you use the format-number () function, the XSLT processor identifies a decimal format to use to interpret the pattern that you specify as the second argument. Ifthe format-number () function is passed three arguments, the third argument is taken as the name of a decimal format, and that decimal format is used. If the format-number () function is passed two arguments, then the default decimal format is used; if you haven't specified a default decimal format, then the XSLT processor uses one with ali attributes set to their default values. 711

21 Appendix B When the XSLT processor formats the number, it looks first to see if it is infinity or not a number. If it is infinity, then the XSLT processor returns the string held in the inf ini ty attribute. If it is not a number, then the XSLT processor returns the string held in the NaN attribute. If the number is a number, and not infinity, the XSLT processor has to format it according to the pattern string passed as the second argument of format-number () and the decimal format that is identified. The processor splits the pattern into a positive pattern and a negative pattern at the character held by the pattern-separator attribute, which defaults to the semicolon character (;). The minus sign is indicated by the character held by the minus-sign attribute, which defaults to the hyphen character (-), within the negative pattern. If there's no negative pattern, then it defaults to the same as the positive pattern, prefixed by the character held in the minus-sign attribute ofthe decima! format. If the pattern contains the character held by the percent attribute (which defaults to the percent character, %), then the number being formatted is multiplied by 100 prior to formatting, and that character is included as specified by the pattern. If the pattern contains the character held by the permille attribute (which defaults to the per-mille character, 80 or &#x2 030;), then the number being formatted is multiplied by prior to formatting, and that character is included as specified by the pattern. The remaining pattern string is interpreted to indicate how many digits should occur before and after the decimal point and if the digits should be grouped, and if so what by. Within the pattern, essential digits are indicated by the character held in the zero-digit attribute (which defaults to the zero character, ), and optional digits are indicated by the character held in the digit attribute (which defaults to the hash character, #). The decimal point is the character held in the decimal-point attribute of the decimal format (which defaults to the period character,.). Groups of digits are separated by the character held in the grouping-separator attribute (which defaults to the comma character,,). xsl :element 712 <xsl:element name="{qualified-name}" namespace=" {namespace-uri} " use-attribute-sets=" list-of-quali fied-names" > template </xsl:element> See also: <xsl: attribute-set> The <xsl: element> instruction creates an element. The name of the element that's created is determined by its name and namespace attributes. The name attribute gives the qualified name for the element and the namespace attribute gives the namespace for the element. If the namespace attribute is missing, then the qualified name specified by the name attribute is used to identify the namespace for the element - the namespace associated with the qualified name's prefix, or the default namespace if it doesn't have a prefix. Both the name and namespace attributes are attribute value templates, so their values can be calculated on the fiy - in fact, this is the only reason you should use <xsl: element> rather than a literal re suit element. Ifthe use-attribute-sets attribute is present, then the attributes held in the attribute sets named within this attribute are added to the created element. ther attributes and the content of the element are generated as the result of processing the content of the <xs l : el emen t> instruction.

22 XSL T Quick Reference xsl:fallback <xsl:fallback> template </xsl:fallback> The <xsl : fallback> element provides alternative processing in the event that an implementation does not support a particular element. When an XSL T processor comes across an instruction that it doesn't understand (such as an XSLT 2.0 instruction or an extension element), it looks for an <xs 1 : f allback> element amongst its children. If it finds one, it processes the content of that <xs 1 : f allback> element; if it doesn't, it stops processing and the transformation fails. xsl :for-each <xsl:for-each select="node-set-expression"> (xsl:sort, template) </xsl:for-each> See also: <xsl : sort>, <xsl: apply-templates> The <xsl: for-each> instruction tells the XSLT processor to gather together a set of nodes and process them one by one. The nodes are selected by the expres sion held in the select attribute. If there are any <xsl: sort> elements, these change the order in which the nodes are processed; ifthere aren't any, then they are processed in document order. Each of the nodes is then processed according to the instructions held in the <xsl : for-each> after any <xsl : sort> elements. xsl:if <xsl:if test="boolean-expression"> template </xsl:if> See also: <xsl: choose>, <xsl :when> The <xs 1 : i f> instruction performs some conditional processing. The content of the <xs 1 : i f> is only processed if the expression held in its tes t attribute evaluates to boolean true. xsl:import 713

23 Appendix B <xsl:import href="uri" /> See also: <xsl: include>, <xsl: apply-imports> The <xsl: import> element imports a stylesheet into this one. This gives you access to au the declarations and templates within that stylesheet, and auows you to override them with your own if you need to. The href attribute gives the location of the imported stylesheet. Any <xsl : import> elements must be the very first elements within the stylesheet, the first children of the <xsl: stylesheet> document element. xsl:include <xsl:include href="uri" /> See also: <xsl : import> The <xsl: include> element includes a stylesheet in this one. This gives you access to au the declarations within that stylesheet, exact1y as if they had been specified in your stylesheet. The href attribute gives the location of the included stylesheet. The <xsl : incl ude> element is a top-ievel element, and must appear as a direct child of the <xsl: stylesheet> document element. xsl:key <xsl:key name="qualified-name" match="pattern" use="expression" /> See also: key ( ) The <xs 1 : key> element declares a key, which indexes au the nodes in a document by a particular value. Each key is identified by its name attribute. The nodes that are indexed by a key are those that match the pattern held in its ma tch attribute. The value by which each node is indexed is specified through the use attribute. The expression held in the use attribute is evaluated for each matched node. If it results in a string, number, or boolean, then that value is used to index the node. If the expression evaluates as a node set, then there are multiple entries for the matched node, one for each of the selected nodes, using the string value of each of those nodes. This enables you to access a node through multiple values using the key () function. The <xsl: key> elements are top-ievel elements, direct children of the <xsl: stylesheet> document element. There can be multiple keys with the same name within a stylesheet; they are combined for the purpose of retrieving nodes using the key () function. 714

24 XSL T Quick Reference xsl:message <xsl:message terminate="yes I no"> template </xsl:message> The <xsl: message> instruction sends a message to the XSLT processor, which will usually forward the message on to the person running the transformation. If the terminate attribute is present with the value yes, then the transformation ends with the error message, otherwise it continues. The content of the <xs 1 : mes sage> instruction provides the message itself. xsl :namespace-alias <xsl:narnespace-alias stylesheet-prefix="narnespace-prefix I #default" result-prefix="narnespace-prefix I #default" /> The <xsl: namespace-alias> element tells the XSLT processor that a namespace as used in the stylesheet should be substituted by another namespace in the result tree. This is usually used when creating stylesheets that create stylesheets: a namespace alias enables you to create the XSLT elements for the result as literal result elements, without the XSLT processor confusing them with instructions that it should follow. The stylesheet-prefix attribute holds the prefix associated with the alias namespace within the stylesheet. The resul t-prefix attribute holds the prefix associated with the namespace that should be used instead, in the result (which is usually xsl when generating XSLT). The keyword #defaul t can be used to indicate the default (unprefixed) namespace in either attribute. xsl:number <xsl:nurnber level="single I multiple I any" count="pattern" from="pattern" value="numeric-expression" format=" {format-pattern}" lang=" {language-code} " letter-value="{alphabetic I traditional}" grouping-separator=" {character} " grouping-size="{integer}" /> See also: format-number (), posi tion () 715

25 Appendix B The <xs 1 : number> instruction inserts a number into the result tree. The <xsl : number> instruction actually has two roles: generating a number and formatting that number. By default, <xsl : number> generates a number based on the position of the current node amongst its similarly named siblings within the source XML document. You can control what number is generated more precisely using the level, count, and from attributes. The level attribute determines what kinds of numbers are generated. The value single numbers nodes amongst their siblings. The value any numbers nodes throughout the source tree. The value mul tiple creates multilevel numbering based on the hierarchical structure of the source tree. nly nodes that match the pattern held in the count attribute will be counted when creating a number. The from attribute holds a pattern matching the node from which numbering should start afresh. If you already know the number that you want, you can use the val ue attribute to specify the number directly, rather than using the number-generating aspect of <xsl: number>. The number is formatted according to the format pattern held in the format attribute. This works in a different way from the format pattern used by the format-number () function, because it's used to number integers rather than decimal numbers. The format pattern can hold any punctuation characters and placeholders that indicate where the number should be included and in what format. There are five standard placeholders: 1 for decimal numbers, a for lowercase alphabetical numbers, A for uppercase alphabetical numbers, i for lowercase Roman numbers, and I for uppercase Roman numbers. Processors can support other numbering schemas as well. The lang and letter-value attributes help the processor decide which alphabet and numbering scheme to use. If the number is large, then the digits may be grouped into groups of the size specified by the groupingsize attribute and separated by the character specified by the grouping-separator attribute. xsl :otherwise <xsl:otherwise> template </xsl:otherwise> See also: <xsl : choose>, <xsl: when> The <xsl: otherwise> element appears only within an <xsl: choose> element, containing the instructions that are processed if none of the expressions held in the tes t attributes of the <xsl :when> elements evaluate as true. 716

26 XSL T Quick Reference xsl:output <xsl: output method= "xml I text I html I qualified-name" media-type="content-type" version="version-number" encoding="encoding" indent="yes I no" doct ype-public= " string" doctype-system=" URI" omit-xml-declaration="yes I no" standalone="yes I no" cdata-section-elements="list-of-name-tests" /> The <xsl: output> element descrihes how the result of the transformation should he serialized into a file. The method attrihute has the most effect on the serialization, determining whether the stylesheet creates XML, text, HTML, or some other format defined hy a processor implementer. The mediatype and version attrihutes give tighter definition ahout the format heing generated. The encoding attribute determines the character encoding used during serialization, and defaults to UTF-8 or UTF-16. The indent attrihute determines whether whitespace-only text nodes are added to the result tree in order to make it easier to read; this is yes hy default for HTML and no hy default for XML. The doctype-public and doctype-system attrihutes hold the puhlic and system identifiers for the result, which are included in a DCTYPE declaration at the top of the generated file. When generating XML, a processor wih add an XML declaration at the start of the output, unless the omi t-xml-declaration attrihute is present with the value yes. Even if this attrihute is present, the XML declaration wih stih be added if the encoding is something other than UTF-8 or UTF-16, or if the standalone attribute is present (in which case the XML declaration contains a standalone pseudoattribute with the specified value). The cdata-section-elements attribute lists the names of elements in the result whose text content should he wrapped within CDATA sections. The <xsl: output> element should appear at the top level of the stylesheet, as a child of the <xsl: stylesheet> document element. There can be multiple <xsl: output> elements in a stylesheet, in which case they are comhined on an attrihute-hy-attrihute hasis; it is an error for more than one <xsl: output> element to specify the same attrihute with different values. xsl:param <xsl:param name="qualified-name" select="expression"> template </xsl:param> 717

27 Appendix B See also: <xsl: wi th-param>, <xsl: variable>, <xsl : template> The <xsl: param> element declares a parameter for a template (if it's within a template) or for the stylesheet as a whole (if it's at the top level of the stylesheet). The name attribute holds the name of the parameter. The select attribute or the content of the <xsl: param> element holds the default value for the parameter, which will be used if no value is explicitly pas sed in to the stylesheet or template for that parameter. It is an error to specify both a select attribute and some content; use the select attribute if you can, otherwise you'll create a result tree fragment. xsl :preserve-space <xsl:preserve-space elements="list-of-name-tests" /> See also: <xsl: strip-space> The <xsl: preserve-space> element specifies the elements whose child whitespace-only text nodes should be preserved within the source node tree. The elements attribute holds a whitespace-separated list of name tests (which can include specific names, or * to mean any element, for example). Whitespace-only text nodes are preserved by default, so this element is only required if <xsl: stripspace> has been used to strip whitespace-only text nodes from the node tree. xsl:processing-instruction <xsl:processing-instruction name="unqualified-name"> template </xsl:processing-instruction> See also: <xsl: comment> The <xsl :processing-instruction> instruction creates a processing instruction whose target is the name held in the name attribute and whose value is the result of processing the template that it contains. The content ofthe <xsl: processing-instruction> element must not result in the generation of any nodes aside from text nodes, and the text nodes that it generates must not contain the string,? > '. xsl:sort 718 <xsl:sort select="string-expression" data-type="{text I nurnber I qualified-name} " order="{ascending I descending}" lang=" {language-code} " case-order="{upper-first I lower-first}" />

28 XSLT Quick Reference See also: <xsl: apply-templates>, <xsl: for-each> The <xsl: sort> element specifies a method of sorting a set of nodes. For each of the nodes selected in the surrounding <xsl: apply-templates> or <xsl: for-each> instruction, the <xsl: sort> element creates a sort key by evaluating the expres sion held in the select attribute with the node as the current node and converting it to a string. The nodes are then sorted according to this sort key and the other attributes on the <xsl: sort> element. The data-type attribute determines whether the nodes are sorted by their sort key in alphabetical order (text), in numeric order (number), or in some other order supported by the implementation. The order attribute determines whether the nodes are sorted in ascending order or descending order. The lang and case-order attributes are used ifit's an alphabetical sort; the default language is determined from the system environment, while the case ordering (whether uppercase letters are sorted before lowercase letters or vice versa) is based on the language being used. If there are multiple <xsl: sort> elements, then they define sub-sort keys on which nodes are sorted only if they have the same value for their sort key according to the previous sort. xsl :stri p-space <xsl:strip-space elements="list-of-name-tests" /> See also: <xsl :preserve-space>, normalize-space () The <xsl: strip-space> element specifies the elements whose child whitespace-only text nodes are removed from the node tree when it is created. The elements attribute holds a whitespace-separated list of name tests (which can include specific names, or * to mean any element, for example). The <xsl :preserve-space> element can override this specification. xsl :stylesheet <xsl:stylesheet version="l." id=" identifier" extension-element-prefixes= " list-of-namespace-prefixes" exclude-result-prefixes="list-of-namespace-prefixes" > (xsl:import*, top-level-elements) </xsl:stylesheet> See also: <xsl: transform> The <xsl: stylesheet> element is the document element for a stylesheet, and holds an the top-ievel elements such as global variable and parameter declarations, templates, decimal format and attribute set definitions, key declarations, output declarations, and so ono Any <xsl: import> elements that the stylesheet contains must come before anything else within the <xsl : stylesheet> element. 719

29 Appendix B The <xsl: stylesheet> element must have a version attribute indicating the version of XSLT being used, which for now should always be 1.. Ifyou're embedding a stylesheet within an XML document, the id attribute can be used as an identifier so that you can point to the stylesheet. The extension-element-prefixes attribute lists the prefixes ofnamespaces that are used for extension elements. The exclude-result-prefixes attribute lists the prefixes ofnamespaces that shouldn't be included in the result document, which are usually those namespaces that are used in the source XML document. xsl:template <xsl:template match="pattern" mode="qualified-name" priority="number" name="qualified-name" > (xsl:param*, template) </xsl:template> See also: <xsl: apply-templates>, <xsl: call-template> The <xsl: template> element declares a template. Templates can be used in two ways within a stylesheet - they can be applied to nodes or they can be called by name. Each template must specify either a match attribute, so that it can be applied to nodes, or a name attribute, so that it can be called by name. When templates are applied to a node set using <xsl: apply-templates>, they might be applied in a particular mode; the mode attribute on <xsl: template> indicates the mode in which templates need to be applied for this template to be used. If templates are applied in the relevant mode, then the match attribute is used to determine whether the template can be used with the particular node. The ma tch attribute holds a pattern against which nodes are matched. If a node matches the pattern, then the template can be used to process that node. If there's more than one template that matches a node in the specified mode, then the priority attribute is used to determine which one should be used - the highest priority wins. If no priority is specified explicitly, the priority of a template is determined from its match pattern. Whether templates are applied or called, they can be passed parameters through the <xs 1 : wi thparam> element. To receive a parameter, however, the template must contain an <xsl : param> element that declares a parameter of that name. These parameters are given before the body of the template, which is used to process the node and create a result. xsl:text <xsl:text disable-output-escaping="yes ID"> text </xsl:text> 720

30 XSL T Quick Reference The <xsl: text> element is used to add some text to the re suit tree. Unlike elsewhere within an XSLT stylesheet, whitespace-only text nodes within <xsl: text> elements are included, so <xsl: text> is the only way to add whitespace-only text nodes to the result tree (aside from those automatically added if you tell the processor to indent the output using the inden t attribute on <xsl : ou tpu t». The <xsl: text> element is also useful for limiting the amount of space that's included around text when it's added to the re suit. Ifthe disable-output-escaping attribute is specified with the value yes then the content ofthe <xsl : text> element is output without special characters such as < and & being escaped with &1 t; or &. xsl :transform <xsl:transform version="l." id=" identifier" extension-element-prefixes="list-of-namespace-prefixes" exclude-result-prefixes="list-of-namespace-prefixes"> (xsl:import*, top-level-elements) </xsl:transform> See also: <xsl: transform> The <xsl: transform> element is an alias for <xsl: stylesheet>; see the definition of <xsl: stylesheet> for details. xsl:value-of <xsl:value-of select.="string-expression" disable-output-escaping="yes I no" /> See also: <xsl: copy-of> The <xsl: value-of> instruction adds the string value of the selected expres sion to the re suit tree. The select attribute holds the expression that's evaluated. If the re suit is a node set, then <xs 1 : val ue-of> adds the string value of the first node in that node set; none of the structure of the node is preserved (you need <xsl : copy-of> for that). Ifthe disable-output-escaping attribute is specified with the value yes then the value is output without special characters such as < and & being escaped with &1 t; or &. 721

31 Appendix B xsl:variable <xsl:variable name="qualified-name" select="expression"> template </xsl:variable> See also: <xsl : param> The <xsl: variable> element declares a variable. If the <xsl : variable> element appears at the top level of the stylesheet, as a child of the <xs 1 : s tyl esheet> document element, then it is a global variable with a scope covering the entire stylesheet. therwise, it is a local variable with a scape of its following siblings and their descendants. The name attribute specifies the name of the variable. After declaration, the variable can be referred to within XPath expressions using this name, prefixed with the $ character. The value of the variable is determined either by the select attribute or by the contents of the <xsl: variable> element. It is an error to have both a select attribute and some content. If you can, use the select attribute to set the variable; otherwise the variable holds a result tree fragment. xsl:when <xsl:when test.="boolean-expression"> template </xsl:when> See also: <xsl: choose>, <xsl: otherwise>, <xsl: if> The <xsl: when> element appears within an <xsl: choose> instruction and specifies a set of processing that could occur and the condition when it occurs. The XSL T processor processes the content of the first <xsl :when> within the <xsl: choose> whose test attribute contains an expression that evaluates as true. xsl:with-param 722 <xsl:with-param name="qualified-name" select="expression"> template </xsl:with-param> See also: <xsl :param>, <xsl: apply-templates>, <xsl: call-template>

32 XSL T Quick Reference The <xsl :with-param> element specifies the value that should be passed to a template parameter.1t can be used when applying templates with <xsl: apply-templates> or calling templates with <xsl: call-template>. The name attribute holds the name of the parameter for which the value is being passed. The value of the parameter is determined either by the select attribute or by the contents of the <xsl: wi th-param> element. It is an error to have both a select attribute and some content. If you can, use the select attribute to set the parameter; otherwise the parameter will be passed a result tree fragment as its value. XSLT Attributes There are four attributes from the XSL T namespace that can be added to any literal result element. xsl :extension-element-prefixes <element xsl:extension-element-prefixes="list-of-namespace-prefixes"> template </element> See also: <xsl : stylesheet> The xs 1 : extension -elemen t -pref ixes attribute lists the prefixes of namespaces that are being used for extension elements. This works exact1y like the extension-element-prefixes attribute on <xsl: stylesheet>, but only within the scope of the literal result element. xsl:exclude-result-prefixes <element xsl:exclude-result-prefixes="list-of-namespace-prefixes"> template </element> See also: <xsl : stylesheet> The xsl : exclude-resul t-prefixes attribute lists the prefixes of namespaces that should not be included within the result tree. This works exact1y like the exclude-result-prefixes attribute on <xsl: stylesheet>, but only within the scope ofthe literal result element. 723

33 Appendix B xsl:use-attribute-sets <element xsl:use-attribute-sets="list-of-qualified-names"> template </element> See also: <xsl: attribute-set>, <xsl: element>, <xsl: copy> The xsl : use-attribute-sets attribute lists the names of attribute sets that contain attributes that should be added to the literal result element, in exactly the same way as the use-attribute-sets attribute works with <xsl : element> and <xsl : copy>. xsl :version <element xsl:version="l."> template </element> See also: <xsl : stylesheet> The xsl : vers ion attribute specifies the version of XSLT that is being used within its content (which is currently always 1. ). This attribute is required on the document element of simplified stylesheets, which have a literal result element as their document element. 724

34 XSl T Quick Reference 725

35

36 10015 XSLT Processors Saxon rceforge. net! o Java (and "instant" version) supports XSLT 1.0/ has limited support for XSLT 2.0 lots of extension elements and functions supports user-defined extension functions in XSLT andjava supports TrAX GAXP 1.1 conformant) Xalan-J Java current version several extension elements and functions supports user-defined extension functions through Bean Scripting Framework supports TrAX GAXP 1.1 conformant)

XSL Elements. xsl:copy-of

XSL Elements. xsl:copy-of XSL Elements The following elements are discussed on this page: xsl:copy-of xsl:value-of xsl:variable xsl:param xsl:if xsl:when xsl:otherwise xsl:comment xsl:import xsl:output xsl:template xsl:call-template

More information

XSLT: How Do We Use It?

XSLT: How Do We Use It? XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman 1 XSLT: Agenda Introduction & Terminology XSLT Walkthrough Client-Side XSLT/XHTML Server-Side XSLT/XHTML More Creative Server-Side XSLT 2 XSLT:

More information

XPath Expression Syntax

XPath Expression Syntax XPath Expression Syntax SAXON home page Contents Introduction Constants Variable References Parentheses and operator precedence String Expressions Boolean Expressions Numeric Expressions NodeSet expressions

More information

Appendix H XML Quick Reference

Appendix H XML Quick Reference HTML Appendix H XML Quick Reference What Is XML? Extensible Markup Language (XML) is a subset of the Standard Generalized Markup Language (SGML). XML allows developers to create their own document elements

More information

XPath and XSLT. Overview. Context. Context The Basics of XPath. XPath and XSLT. Nodes Axes Expressions. Stylesheet templates Transformations

XPath and XSLT. Overview. Context. Context The Basics of XPath. XPath and XSLT. Nodes Axes Expressions. Stylesheet templates Transformations XPath and XSLT Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring Context The Basics of XPath Nodes

More information

XSL and OU Campus. OmniUpdate User Training Conference OmniUpdate, Inc Flynn Road, Suite 100 Camarillo, CA 93012

XSL and OU Campus. OmniUpdate User Training Conference OmniUpdate, Inc Flynn Road, Suite 100 Camarillo, CA 93012 XSL and OU Campus OmniUpdate User Training Conference 2015 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012 800.362.2605 805.484.9428

More information

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on XML and Semantic Web

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on XML and Semantic Web Course on XML and Semantic Web Technologies, summer term 2012 0/44 XML and Semantic Web Technologies XML and Semantic Web Technologies I. XML / 5. XML Stylesheet Language Transformations (XSLT) Lars Schmidt-Thieme

More information

XSL Transformation (XSLT) XSLT Processors. Example XSLT Stylesheet. Calling XSLT Processor. XSLT Structure

XSL Transformation (XSLT) XSLT Processors. Example XSLT Stylesheet. Calling XSLT Processor. XSLT Structure Transformation (T) SOURCE The very best of Cat Stevens UK 8.90 1990 Empire Burlesque Bob

More information

Computer Science E-259

Computer Science E-259 Computer Science E-259 XML with Java Lecture 5: XPath 1.0 (and 2.0) and XSLT 1.0 (and 2.0), Continued 22 October 2007 David J. Malan malan@post.harvard.edu 1 Computer Science E-259 Last Time CSS Level

More information

Burrows & Langford Appendix D page 1 Learning Programming Using VISUAL BASIC.NET

Burrows & Langford Appendix D page 1 Learning Programming Using VISUAL BASIC.NET Burrows & Langford Appendix D page 1 APPENDIX D XSLT XSLT is a programming language defined by the World Wide Web Consortium, W3C (http://www.w3.org/tr/xslt), that provides the mechanism to transform a

More information

Introduction to XSLT

Introduction to XSLT Introduction to XSLT Justin Tilton, Chief Executive Officer instructional media + magic, inc. at the JA-SIG Conference Vancouver, BC Sunday, June 9, 2002 The Abstract Looking for a methodology to quickly

More information

XSL extensible Style Language" DOCUMENTS MULTIMEDIA! Transforming documents using! XSLT" XSLT processor" XSLT stylesheet"

XSL extensible Style Language DOCUMENTS MULTIMEDIA! Transforming documents using! XSLT XSLT processor XSLT stylesheet DOCUMENTS MULTIMEDIA! Transforming documents using! XSLT" XSL extensible Style Language"!" A family of languages for defining document transformation and presentation" XSL XSLT XSL-FO Christine Vanoirbeek"

More information

XML. <subtitle>xslt (cont)</subtitle> <author>prof. Dr. Christian Pape</author>

XML. <subtitle>xslt (cont)</subtitle> <author>prof. Dr. Christian Pape</author> XML xslt (cont) prof. Dr. Christian Pape Content Expressions and Functions Copying nodes Using variables and parameters Conditional Processing XSLT 5-2 Expressions

More information

Author: Irena Holubová Lecturer: Martin Svoboda

Author: Irena Holubová Lecturer: Martin Svoboda NPRG036 XML Technologies Lecture 6 XSLT 9. 4. 2018 Author: Irena Holubová Lecturer: Martin Svoboda http://www.ksi.mff.cuni.cz/~svoboda/courses/172-nprg036/ Lecture Outline XSLT Principles Templates Instructions

More information

XML and Semantic Web Technologies. II. XML / 5. XML Stylesheet Language Transformations (XSLT)

XML and Semantic Web Technologies. II. XML / 5. XML Stylesheet Language Transformations (XSLT) XML and Semantic Web Technologies XML and Semantic Web Technologies II. XML / 5. XML Stylesheet Language Transformations (XSLT) Lars Schmidt-Thieme Information Systems and Machine Learning Lab (ISMLL)

More information

Computer Science E-259

Computer Science E-259 Computer Science E-259 XML with Java Lecture 4: XPath 1.0 (and 2.0) and XSLT 1.0 (and 2.0) 21 February 2007 David J. Malan malan@post.harvard.edu 1 Computer Science E-259 Last Time DOM Level 3 JAXP 1.3

More information

XPath and XSLT without the pain!

XPath and XSLT without the pain! XPath and XSLT without the pain! Bertrand Delacrétaz ApacheCon EU 2007, Amsterdam bdelacretaz@apache.org www.codeconsult.ch slides revision: 2007-05-04 Goal Learning to learn XPath and XSLT because it

More information

Seleniet XPATH Locator QuickRef

Seleniet XPATH Locator QuickRef Seleniet XPATH Locator QuickRef Author(s) Thomas Eitzenberger Version 0.2 Status Ready for review Page 1 of 11 Content Selecting Nodes...3 Predicates...3 Selecting Unknown Nodes...4 Selecting Several Paths...5

More information

XSLT is... XML XSLT XSL-FO XPath

XSLT is... XML XSLT XSL-FO XPath XSLT XSLT is... XML XSLT XSL-FO XPath Назначение XSLT XML XML Назначение XSLT XML HTML Сервер Браузер Назначение XSLT XML HTML Сервер Браузер Declaration

More information

XML. Objectives. Duration. Audience. Pre-Requisites

XML. Objectives. Duration. Audience. Pre-Requisites XML XML - extensible Markup Language is a family of standardized data formats. XML is used for data transmission and storage. Common applications of XML include business to business transactions, web services

More information

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart Advanced XSLT Web Data Management and Distribution Serge Abiteboul Ioana Manolescu Philippe Rigaux Marie-Christine Rousset Pierre Senellart Web Data Management and Distribution http://webdam.inria.fr/textbook

More information

XPath. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

XPath. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University XPath Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Overview What is XPath? Queries The XPath Data Model Location Paths Expressions

More information

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart

Advanced XSLT. Web Data Management and Distribution. Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart Advanced XSLT Web Data Management and Distribution Serge Abiteboul Philippe Rigaux Marie-Christine Rousset Pierre Senellart http://gemo.futurs.inria.fr/wdmd January 15, 2010 Gemo, Lamsade, LIG, Télécom

More information

2006 Martin v. Löwis. Data-centric XML. XPath

2006 Martin v. Löwis. Data-centric XML. XPath Data-centric XML XPath XPath Overview Non-XML language for identifying particular parts of XML documents First person element of a document Seventh child element of third person element ID attribute of

More information

Semi-structured Data 11 - XSLT

Semi-structured Data 11 - XSLT Semi-structured Data 11 - XSLT Andreas Pieris and Wolfgang Fischl, Summer Term 2016 Outline What is XSLT? XSLT at First Glance XSLT Templates Creating Output Further Features What is XSLT? XSL = extensible

More information

XML Wrap-up. CS 431 March 1, 2006 Carl Lagoze Cornell University

XML Wrap-up. CS 431 March 1, 2006 Carl Lagoze Cornell University XML Wrap-up CS 431 March 1, 2006 Carl Lagoze Cornell University XSLT Processing Model Input XSL doc parse Input XML doc parse Parsed tree serialize Input XML doc Parsed tree Xformed tree Output doc (xml,

More information

Dynamic Indexing with XSL

Dynamic Indexing with XSL In content is generally displayed in a static format. This means that the content entered never changes unless it is updated manually. When a page is transformed, the data entered on the page is visible.

More information

Web Services Week 3. Fall Emrullah SONUÇ. Department of Computer Engineering Karabuk University

Web Services Week 3. Fall Emrullah SONUÇ. Department of Computer Engineering Karabuk University Web Services Week 3 Emrullah SONUÇ Department of Computer Engineering Karabuk University Fall 2017 1 Recap XML, Writing XML Rules for Writing XML Elements, Attributes, and Values XSL, XSLT 2 Contents Homework

More information

XSLT. Announcements (October 24) XSLT. CPS 116 Introduction to Database Systems. Homework #3 due next Tuesday Project milestone #2 due November 9

XSLT. Announcements (October 24) XSLT. CPS 116 Introduction to Database Systems. Homework #3 due next Tuesday Project milestone #2 due November 9 XSLT CPS 116 Introduction to Database Systems Announcements (October 24) 2 Homework #3 due next Tuesday Project milestone #2 due November 9 XSLT 3 XML-to-XML rule-based transformation language Used most

More information

info-h-509 xml technologies Lecture 5: XSLT Stijn Vansummeren February 14, 2017

info-h-509 xml technologies Lecture 5: XSLT Stijn Vansummeren February 14, 2017 info-h-509 xml technologies Lecture 5: XSLT Stijn Vansummeren February 14, 2017 lecture outline 1 How XML may be rendered in Web Browsers 2 Syntax and Semantics of XSLT 3 How XPath is used in XSLT 1 our

More information

Introduction to XSLT

Introduction to XSLT Introduction to XSLT Justin Tilton, Chief Executive Officer instructional media + magic, inc. at the JA-SIG Conference Destin, Florida December 2, 2001 The Abstract Looking for a methodology to quickly

More information

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines. Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

White Paper. XML-Based Export and Import of Objects Using XSLT. Fabasoft Folio 2017 R1 Update Rollup 1

White Paper. XML-Based Export and Import of Objects Using XSLT. Fabasoft Folio 2017 R1 Update Rollup 1 White Paper XML-Based Export and Import of Objects Using XSLT Fabasoft Folio 2017 R1 Update Rollup 1 Copyright Fabasoft R&D GmbH, Linz, Austria, 2018. All rights reserved. All hardware and software names

More information

Extensions to XSLT 1.0, and XSLT 2.0

Extensions to XSLT 1.0, and XSLT 2.0 ... Extensions A typical problem: XSLT 1.0 does not have any way of finding the current date and time. However, some XSLT 1.0 processors allow you to use extensions to XSLT 1.0. The EXSLT initiative http://www.exslt.org/

More information

Presentation. Separating Content and Presentation Cascading Style Sheets (CSS) XML and XSLT

Presentation. Separating Content and Presentation Cascading Style Sheets (CSS) XML and XSLT Presentation Separating Content and Presentation Cascading Style Sheets (CSS) XML and XSLT WordPress Projects Theme Generators WYSIWYG editor Look at tools to support generation of themes Design a new

More information

Extensible Markup Stylesheet Transformation (XSLT)

Extensible Markup Stylesheet Transformation (XSLT) Extensible Markup Stylesheet Transformation (XSLT) Asst. Prof. Dr. Kanda Runapongsa Saikaew (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University 1 Overview Terms: XSL, XSLT, XSL-FO Value

More information

Expr Language Reference

Expr Language Reference Expr Language Reference Expr language defines expressions, which are evaluated in the context of an item in some structure. This article describes the syntax of the language and the rules that govern the

More information

Style Sheet A. Bellaachia Page: 22

Style Sheet A. Bellaachia Page: 22 Style Sheet How to render the content of an XML document on a page? Two mechanisms: CSS: Cascading Style Sheets XSL (the extensible Style sheet Language) CSS Definitions: CSS: Cascading Style Sheets Simple

More information

XSLT program. XSLT elements. XSLT example. An XSLT program is an XML document containing

XSLT program. XSLT elements. XSLT example. An XSLT program is an XML document containing XSLT CPS 216 Advanced Database Systems Announcements (March 24) 2 Homework #3 will be assigned next Tuesday Reading assignment due next Wednesday XML processing in Lore (VLDB 1999) and Niagara (VLDB 2003)

More information

6/3/2016 8:44 PM 1 of 35

6/3/2016 8:44 PM 1 of 35 6/3/2016 8:44 PM 1 of 35 6/3/2016 8:44 PM 2 of 35 2) Background Well-formed XML HTML XSLT Processing Model 6/3/2016 8:44 PM 3 of 35 3) XPath XPath locates items within an XML file It relies on the XML

More information

Comp 336/436 - Markup Languages. Fall Semester Week 9. Dr Nick Hayward

Comp 336/436 - Markup Languages. Fall Semester Week 9. Dr Nick Hayward Comp 336/436 - Markup Languages Fall Semester 2018 - Week 9 Dr Nick Hayward DEV Week assessment Course total = 25% project outline and introduction developed using a chosen markup language consider and

More information

Introduction to XSLT. Version 1.3 March nikos dimitrakas

Introduction to XSLT. Version 1.3 March nikos dimitrakas Introduction to XSLT Version 1.3 March 2018 nikos dimitrakas Table of contents 1 INTRODUCTION... 3 1.1 XSLT... 3 1.2 PREREQUISITES... 3 1.3 STRUCTURE... 3 2 SAMPLE DATA... 4 3 XSLT... 6 4 EXAMPLES... 7

More information

Functions & Conditional Statements

Functions & Conditional Statements Functions & Conditional Statements OmniUpdate User Training Conference 2015 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012 OmniUpdate, Inc. 1320 Flynn Road, Suite 100 Camarillo, CA 93012

More information

EXAM XML 1.1 and Related Technologies TYPE: DEMO

EXAM XML 1.1 and Related Technologies TYPE: DEMO IBM EXAM - 000-142 XML 1.1 and Related Technologies TYPE: DEMO http://www.examskey.com/000-142.html 1 Question: 1 XML data is stored and retrieved within a relational database for a data-centric application

More information

XSLT. December 16, 2008

XSLT. December 16, 2008 XSLT December 16, 2008 XML is used in a large number of applications, either data-centric (semi-structured databases), or document-centric (Web publishing). In either case, there is a need for transforming

More information

Exam : Title : XML 1.1 and Related Technologies. Version : DEMO

Exam : Title : XML 1.1 and Related Technologies. Version : DEMO Exam : 000-142 Title : XML 1.1 and Related Technologies Version : DEMO 1. XML data is stored and retrieved within a relational database for a data-centric application by means of mapping XML schema elements

More information

COP 4814 Florida International University Kip Irvine XSLT. Updated: 2/9/2016 Based on Goldberg, Chapter 2. Irvine COP 4814

COP 4814 Florida International University Kip Irvine XSLT. Updated: 2/9/2016 Based on Goldberg, Chapter 2. Irvine COP 4814 COP 4814 Florida International University Kip Irvine XSLT Updated: 2/9/2016 Based on Goldberg, Chapter 2 XSL Overview XSL Extensible Stylesheet Language A family of languages used to transform and render

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Navigating Input Documents Using Paths4

Navigating Input Documents Using Paths4 Chapter 4 CHAPTER 4 Navigating Input Documents Using Paths4 Path expressions are used to navigate input documents to select elements and attributes of interest. This chapter explains how to use path expressions

More information

Introduction to XSLT. Version 1.0 July nikos dimitrakas

Introduction to XSLT. Version 1.0 July nikos dimitrakas Introduction to XSLT Version 1.0 July 2011 nikos dimitrakas Table of contents 1 INTRODUCTION... 3 1.1 XSLT... 3 1.2 PREREQUISITES... 3 1.3 STRUCTURE... 3 2 SAMPLE DATA... 4 3 XSLT... 6 4 EXAMPLES... 7

More information

XML and XSLT. XML and XSLT 10 February

XML and XSLT. XML and XSLT 10 February XML and XSLT XML (Extensible Markup Language) has the following features. Not used to generate layout but to describe data. Uses tags to describe different items just as HTML, No predefined tags, just

More information

6/6/2016 3:23 PM 1 of 15

6/6/2016 3:23 PM 1 of 15 6/6/2016 3:23 PM 1 of 15 6/6/2016 3:23 PM 2 of 15 2) XSLT Selection XSLT allows for selection with two statements xsl:if chooses to do or not to do (very basic) xsl:choose chooses from several alternatives

More information

Chapter 17. Fundamental Concepts Expressed in JavaScript

Chapter 17. Fundamental Concepts Expressed in JavaScript Chapter 17 Fundamental Concepts Expressed in JavaScript Learning Objectives Tell the difference between name, value, and variable List three basic data types and the rules for specifying them in a program

More information

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML CSI 3140 WWW Structures, Techniques and Standards Representing Web Data: XML XML Example XML document: An XML document is one that follows certain syntax rules (most of which we followed for XHTML) Guy-Vincent

More information

Web Data Management XSLT. Philippe Rigaux CNAM Paris & INRIA Saclay

Web Data Management XSLT. Philippe Rigaux CNAM Paris & INRIA Saclay http://webdam.inria.fr Web Data Management XSLT Serge Abiteboul INRIA Saclay & ENS Cachan Ioana Manolescu INRIA Saclay & Paris-Sud University Philippe Rigaux CNAM Paris & INRIA Saclay Marie-Christine Rousset

More information

XML and Databases. Lecture 11 XSLT Stylesheets and Transforms. Sebastian Maneth NICTA and UNSW

XML and Databases. Lecture 11 XSLT Stylesheets and Transforms. Sebastian Maneth NICTA and UNSW XML and Databases Lecture 11 XSLT Stylesheets and Transforms Sebastian Maneth NICTA and UNSW CSE@UNSW -- Semester 1, 2010 Outline 1. extensible Stylesheet Language Transformations (XSLT) 2. Templates:

More information

Advanced XSLT editing: Content query web part (CQWP) Dolev Raz SharePoint top soft Soft.co.il

Advanced XSLT editing: Content query web part (CQWP) Dolev Raz SharePoint top soft Soft.co.il Advanced XSLT editing: Content query web part (CQWP) Dolev Raz SharePoint Implementer @ top soft dolev_r@top- Soft.co.il About Me Dolev Raz 22 years-old Live in Qiriyat Ono Works in Logic trough Top Soft

More information

Semi-structured Data. 8 - XPath

Semi-structured Data. 8 - XPath Semi-structured Data 8 - XPath Andreas Pieris and Wolfgang Fischl, Summer Term 2016 Outline XPath Terminology XPath at First Glance Location Paths (Axis, Node Test, Predicate) Abbreviated Syntax What is

More information

~ Ian Hunneybell: DIA Revision Notes ~

~ Ian Hunneybell: DIA Revision Notes ~ XML is based on open standards, and is text-based, thereby making it accessible to all. It is extensible, thus allowing anyone to customise it for their own needs, to publish for others to use, and to

More information

XSLT Programming Constructs

XSLT Programming Constructs XSLT Programming Constructs Contents 1. Procedural programming in XSLT 2. Defining named template rules 3. Parameterizing XSLT style sheets 2 1. Procedural Programming in XSLT Declarative vs. procedural

More information

COPYRIGHTED MATERIAL. Contents. Part I: Introduction 1. Chapter 1: What Is XML? 3. Chapter 2: Well-Formed XML 23. Acknowledgments

COPYRIGHTED MATERIAL. Contents. Part I: Introduction 1. Chapter 1: What Is XML? 3. Chapter 2: Well-Formed XML 23. Acknowledgments Acknowledgments Introduction ix xxvii Part I: Introduction 1 Chapter 1: What Is XML? 3 Of Data, Files, and Text 3 Binary Files 4 Text Files 5 A Brief History of Markup 6 So What Is XML? 7 What Does XML

More information

The Transformation Language XSL

The Transformation Language XSL Chapter 8 The Transformation Language XSL 8.1 XSL: Extensible Stylesheet Language developed from CSS (Cascading Stylesheets) scripting language for transformation of data sources to HTML or any other optical

More information

XML and Databases. Outline XML. XML, typical usage scenario XML. 1. extensible Stylesheet Language X M L. Sebastian Maneth NICTA and UNSW

XML and Databases. Outline XML. XML, typical usage scenario XML. 1. extensible Stylesheet Language X M L. Sebastian Maneth NICTA and UNSW Outline XML and Databases 1. extensible Stylesheet Language Transformations (XSLT) 2. Templates (match pattern action) Lecture 11 XSLT Stylesheets and Transforms Sebastian Maneth NICTA and UNSW 3. Default

More information

<xsl:apply-templates select="atom:entry/atom:content"/> <xsl:copy-of xmlns:xsl="http://www.w3.org/1999/xsl/transform"/>

<xsl:apply-templates select=atom:entry/atom:content/> <xsl:copy-of xmlns:xsl=http://www.w3.org/1999/xsl/transform/> Split one of your gravestone XSL stylesheets into two parts, one with templates about persons, the other with templates about inscriptions. Have a third template which pulls them together, using .

More information

XML databases. Jan Chomicki. University at Buffalo. Jan Chomicki (University at Buffalo) XML databases 1 / 9

XML databases. Jan Chomicki. University at Buffalo. Jan Chomicki (University at Buffalo) XML databases 1 / 9 XML databases Jan Chomicki University at Buffalo Jan Chomicki (University at Buffalo) XML databases 1 / 9 Outline 1 XML data model 2 XPath 3 XQuery Jan Chomicki (University at Buffalo) XML databases 2

More information

Babu Madhav Institute of Information Technology, UTU 2015

Babu Madhav Institute of Information Technology, UTU 2015 Five years Integrated M.Sc.(IT)(Semester 5) Question Bank 060010502:Programming in Python Unit-1:Introduction To Python Q-1 Answer the following Questions in short. 1. Which operator is used for slicing?

More information

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

More information

INTERNET & WEB APPLICATION DEVELOPMENT SWE 444. Fall Semester (081) Module 4 (III): XSL

INTERNET & WEB APPLICATION DEVELOPMENT SWE 444. Fall Semester (081) Module 4 (III): XSL INTERNET & WEB APPLICATION DEVELOPMENT SWE 444 Fall Semester 2008-2009 (081) Module 4 (III): XSL Dr. El-Sayed El-Alfy Computer Science Department King Fahd University of Petroleum and Minerals alfy@kfupm.edu.sa

More information

XML Technologies. Doc. RNDr. Irena Holubova, Ph.D. Web pages:

XML Technologies. Doc. RNDr. Irena Holubova, Ph.D. Web pages: XML Technologies Doc. RNDr. Irena Holubova, Ph.D. holubova@ksi.mff.cuni.cz Web pages: http://www.ksi.mff.cuni.cz/~holubova/nprg036/ Outline Introduction to XML format, overview of XML technologies DTD

More information

Manipulating XML Trees XPath and XSLT. CS 431 February 18, 2008 Carl Lagoze Cornell University

Manipulating XML Trees XPath and XSLT. CS 431 February 18, 2008 Carl Lagoze Cornell University Manipulating XML Trees XPath and XSLT CS 431 February 18, 2008 Carl Lagoze Cornell University XPath Language for addressing parts of an XML document XSLT Xpointer XQuery Tree model based on DOM W3C Recommendation

More information

MASTER OF SCIENCE THESIS

MASTER OF SCIENCE THESIS MASTER OF SCIENCE THESIS XML to RDBMS By Magnus Karlsson (mka@corus.se) Stockholm, September 2000 Supervisor: Torbjörn Ryeng and Peter Monthan Corus Technologies AB Birger Jarlsgatan 20, 11434 Stockholm

More information

Semantic Web. XSLT: XML Transformation. Morteza Amini. Sharif University of Technology Fall 95-96

Semantic Web. XSLT: XML Transformation. Morteza Amini. Sharif University of Technology Fall 95-96 ه عا ی Semantic Web XSLT: XML Transformation Morteza Amini Sharif University of Technology Fall 95-96 Outline Fundamentals of XSLT XPath extensible Stylesheet Language Cocoon 2 XSLT XSLT stands for extensible

More information

The Transformation Language XSL

The Transformation Language XSL Chapter 8 The Transformation Language XSL 8.1 XSL: Extensible Stylesheet Language developed from CSS (Cascading Stylesheets) scripting language for transformation of data sources to HTML or any other optical

More information

Chapter 1. DocBook XSL

Chapter 1. DocBook XSL Chapter 1. DocBook XSL Bob Stayton $Id: publishing.xml,v 1.4 2002/06/03 19:26:58 xmldoc Exp $ Copyright 2000 Bob Stayton Table of Contents Using XSL tools to publish DocBook documents... 1 XSLT engines...

More information

IBM Research Report. Using XSLT to Detect Cycles in a Directed Graph

IBM Research Report. Using XSLT to Detect Cycles in a Directed Graph RC23144 (W0403-066) March 9, 2004 Computer Science IBM Research Report Using XSLT to Detect Cycles in a Directed Graph David Marston IBM Research Division Thomas J. Watson Research Center One Rogers Street

More information

Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005

Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005 Oracle Application Server 10g Oracle XML Developer s Kit Frequently Asked Questions September, 2005 This FAQ addresses frequently asked questions relating to the XML features of Oracle XML Developer's

More information

Foreword... v Introduction... vi. 1 Scope Normative references Terms and definitions Extensible Datatypes schema overview...

Foreword... v Introduction... vi. 1 Scope Normative references Terms and definitions Extensible Datatypes schema overview... Contents Page Foreword... v Introduction... vi 1 Scope... 1 2 Normative references... 1 3 Terms and definitions... 1 4 Extensible Datatypes schema overview... 2 5 Common constructs... 3 5.1 Common types...

More information

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating

More information

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating

More information

XML Data Management. 6. XPath 1.0 Principles. Werner Nutt

XML Data Management. 6. XPath 1.0 Principles. Werner Nutt XML Data Management 6. XPath 1.0 Principles Werner Nutt 1 XPath Expressions and the XPath Document Model XPath expressions are evaluated over documents XPath operates on an abstract document structure

More information

XML, XPath, and XSLT. Jim Fawcett Software Modeling Copyright

XML, XPath, and XSLT. Jim Fawcett Software Modeling Copyright XML, XPath, and XSLT Jim Fawcett Software Modeling Copyright 1999-2017 Topics XML is an acronym for extensible Markup Language. Its purpose is to describe structured data. XPath is a language for navigating

More information

In addition to the primary macro syntax, the system also supports several special macro types:

In addition to the primary macro syntax, the system also supports several special macro types: The system identifies macros using special parentheses. You need to enclose macro expressions into curly brackets and the percentage symbol: {% expression %} Kentico provides an object-oriented language

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

Birkbeck (University of London)

Birkbeck (University of London) Birkbeck (University of London) MSc Examination Department of Computer Science and Information Systems Internet and Web Technologies (COIY063H7) 15 Credits Date of Examination: 13 June 2017 Duration of

More information

Foreword... v Introduction... vi. 1 Scope Normative references Terms and definitions DTLL schema overview...

Foreword... v Introduction... vi. 1 Scope Normative references Terms and definitions DTLL schema overview... Contents Page Foreword... v Introduction... vi 1 Scope... 1 2 Normative references... 1 3 Terms and definitions... 1 4 DTLL schema overview... 2 5 Common constructs... 3 5.1 Common types... 3 5.1.1 XPath

More information

Presentation 19: XML technologies part 2: XSL, XSLT, XSL-FO, XPath & XML Programming

Presentation 19: XML technologies part 2: XSL, XSLT, XSL-FO, XPath & XML Programming Presentation 19: XML technologies part 2: XSL, XSLT, XSL-FO, XPath & XML Programming Outline XML recap Formatting CSS or XSL? XPath XSL/XSLT XSL-FO XML Programming Slide 2 XML markup recap XML based on

More information

XSLT (part I) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 22

XSLT (part I) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 22 1 / 22 XSLT (part I) Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 22 1 Introduction 2 Templates 3 Attributes 4 Copy of elements 5 Exercises 4 / 22 What is XSLT? XSLT is a (Turing

More information

Programming issues 5.1 CONTROL STATEMENTS

Programming issues 5.1 CONTROL STATEMENTS C H A P T E R 5 Programming issues 5.1 Control statements 110 5.2 Combining stylesheets with include and import 126 5.3 Named templates 132 5.4 Debugging 133 5.5 Extensions to XSLT 143 5.6 Numbers and

More information

XSL Concepts: Conditions and Loops. Robert Kiffe, Senior Web Developer OmniUpdate, Inc.

XSL Concepts: Conditions and Loops. Robert Kiffe, Senior Web Developer OmniUpdate, Inc. XSL Concepts: Conditions and Loops Robert Kiffe, Senior Web Developer OmniUpdate, Inc. Quick XSL Recap Conditional Statements If Choose XPath Conditional Loops For-Each For-Each-Group Apply-Templates Activities!

More information

For personnal use only

For personnal use only XSLT 1.0 Multiple Namespace Issues Finnbarr P. Murphy (fpm@fpmurphy.com) XSLT and XPath assume that XML documents conform to the XML Namespaces recommendation whereby XML namespaces are identified by a

More information

XSDs: exemplos soltos

XSDs: exemplos soltos XSDs: exemplos soltos «expande o tipo base»

More information

CSC Web Technologies, Spring Web Data Exchange Formats

CSC Web Technologies, Spring Web Data Exchange Formats CSC 342 - Web Technologies, Spring 2017 Web Data Exchange Formats Web Data Exchange Data exchange is the process of transforming structured data from one format to another to facilitate data sharing between

More information

HAWK Language Reference Manual

HAWK Language Reference Manual HAWK Language Reference Manual HTML is All We Know Created By: Graham Gobieski, George Yu, Ethan Benjamin, Justin Chang, Jon Adelson 0. Contents 1 Introduction 2 Lexical Convetions 2.1 Tokens 2.2 Comments

More information

XSL Languages. Adding styles to HTML elements are simple. Telling a browser to display an element in a special font or color, is easy with CSS.

XSL Languages. Adding styles to HTML elements are simple. Telling a browser to display an element in a special font or color, is easy with CSS. XSL Languages It started with XSL and ended up with XSLT, XPath, and XSL-FO. It Started with XSL XSL stands for EXtensible Stylesheet Language. The World Wide Web Consortium (W3C) started to develop XSL

More information

Client-Side Web Technologies. CSS Part I

Client-Side Web Technologies. CSS Part I Client-Side Web Technologies CSS Part I Topics Style declarations Style sources Selectors Selector specificity The cascade and inheritance Values and units CSS Cascading Style Sheets CSS specifies the

More information

Generating Web Pages Using XSLT

Generating Web Pages Using XSLT Generating Web Pages Using XSLT 238 XSLT for Data Interchange 239 6.1.xml: An Employee List Document

More information

Course: The XPath Language

Course: The XPath Language 1 / 27 Course: The XPath Language Pierre Genevès CNRS University of Grenoble, 2012 2013 2 / 27 Why XPath? Search, selection and extraction of information from XML documents are essential for any kind of

More information

Transcript of Abel Braaksma's Talk on XSLT Streaming at XML Prague 2014

Transcript of Abel Braaksma's Talk on XSLT Streaming at XML Prague 2014 Transcript of Abel Braaksma's Talk on XSLT Streaming at XML Prague 2014 The video of Abel's talk is here: http://www.youtube.com/watch?v=kaupzeew4xg&t=318m25s Abel's slides are here: http://exselt.net/portals/1/streaming%20for%20the%20masses.zip

More information

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. XML 2 APPLIATION hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: How to create an XML document. The role of the document map, prolog, and XML declarations. Standalone declarations.

More information