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

Size: px
Start display at page:

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

Transcription

1 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" EPFL IC CGC" Bâtiment BC (Station 14)" 1015 LAUSANNE" xpath christine.vanoirbeek@epfl.ch" Documents Multimedia - Restitution de documents (XSLT) ! (2)! XSLT processor"!" XSLT allows to specify transformations from XML documents into other documents (any target formats)" XSLT stylesheet"!" XSLT is an XML application"!" Use of a namespace"!" Global structure of an XSLT file" source XML processeur XSLT règles XSLT Résultat (XML, HTML, ) <?xml version="1.0" encoding="utf-8"?> <xsl:styleheet version="1.0" xmlns:xsl=" <xsl:template match="...">... <xsl:template/>... </xsl:stylesheet/> Documents Multimedia - Restitution de documents (XSLT) ! (3)! Documents Multimedia - Restitution de documents (XSLT) ! (4)!

2 Output format <xsl:output>" Introductory example: schema "!" The element <xsl:output method="format"> specifies the target output format"!" Possible values for format are"!" xml (default value)!" html for HTML; in this case, some tags may be corrected!!" text for any textual format! ProductId Language Currency Documents Multimedia - Restitution de documents (XSLT) ! (5)! Documents Multimedia - Restitution de documents (XSLT) ! (6)! Introductory example: document instance" <?xml version="1.0" encoding="utf-8"?> Introductory example: tree representation" Root (/) <Catalog> <Product ProductId="R1"> <Book Language="FR"> <Price Currency="CHF">79</Price> <Title>XML - le langage et ses applications </Title> <Authors> <Author> <FirstName>Alain</FirstName> <LastName>Michard</LastName> </Author> </Authors> <Publisher>Eyrolles</Publisher> <Year>1999</Year> </Book> <Product ProductId="R1"> Comment P. I. Element <! edited <?xml-style (Catalog) Element Element (Product) (Product) Attribute Element (ProductId) (Book) Attribute Element (Language) (Price) Documents Multimedia - Restitution de documents (XSLT) ! (7)! Documents Multimedia - Restitution de documents (XSLT) ! (8)!

3 Types of nodes" Example: a first stylesheet"!" XSLT distinguishes between 7 types of nodes:"!" The root!!" The elements!!" The attributes!!" The text nodes!!" The comments <! >!!" The processing instructions <?...?>!" The namespaces definitions! <xsl:stylesheet version="1.0" xmlns:xsl=" XSL/Transform"> <xsl:template match="/"> </xsl:stylesheet> Documents Multimedia - Restitution de documents (XSLT) ! (9)! Documents Multimedia - Restitution de documents (XSLT) ! (10)! XSLT processor: processing model"!" Tree traversal"!" Processing = «#generation of data from the XML source#» through application of rules"!" Rules are specified via the templates!!" Default rule! Rules <xsl:template>"!" The element <xsl:template...> specifies a transformation rule."!" The attribute match=" " specifies the nodes the rule applies"!" For instance, "/" means the root of the document!!" xsl:template content specifies the output data to be generated"!" text (potentially structured)! " " Documents Multimedia - Restitution de documents (XSLT) ! (11)! Documents Multimedia - Restitution de documents (XSLT) ! (12)!

4 Example 2: catalog-flow.xsl! <xsl:stylesheet version="1.0" xmlns:xsl=" XSL/Transform"> <xsl:apply-templates/> Example 2: comments"!" Inside a rule, the instruction! <xsl:apply-templates...>! generates the application of rules in a recursive way"!" Applied on the elements!!" Default behaviour"!" Copy of the content! </xsl:stylesheet> Documents Multimedia - Restitution de documents (XSLT) ! (13)! Documents Multimedia - Restitution de documents (XSLT) ! (14)! Example 3: catalog-better-flow.xsl! Example 3: comments"!" Use of several rules" <xsl:template match="/"> <UL> <xsl:apply-templates/> </UL> <xsl:template match ="Product"> <LI> <xsl:apply-templates/> </LI>!" The match attribute specifies the nodes concerned by the rule"!" Examples: «#/#» (root) et «#Product#» (the Product element)!!" Use of ypath!!" All the rules are candidate rules" Documents Multimedia - Restitution de documents (XSLT) ! (15)! Documents Multimedia - Restitution de documents (XSLT) ! (16)!

5 Example 4: only-titles.xsl! <xsl:template match="/"> <UL> <xsl:apply-templates select=".//product/*/title"/> </UL> Example 4: comments"!" The select attribute, associated to the applytemplates element specifies the nodes to be processed"!" Example: «#.//Product/*/Title»!!" The path is specified accordingly to the context node" <xsl:template match ="Product/*/Title"> <LI> <xsl:value-of select="."/> </LI> Documents Multimedia - Restitution de documents (XSLT) ! (17)! Documents Multimedia - Restitution de documents (XSLT) ! (18)! Example 4: comments"!" The value-of instruction generates the text content of an element or an attribute, specified by select (XPath expresion)!" "." current element!!" "elt" child element!!" "@attr" attribute!!" Important remark:"!" Only the first occurrence is copied!! Example 5: simple-table.xsl! <xsl:template match="/"> <TABLE border="1"> <TR> <TH>Année</TH> <TH>Auteurs ou Editeurs</TH> <TH>Titre</TH> </TR> <xsl:apply-templates select=".//product"/> </TABLE> <TR> <TD><xsl:apply-templates select=".//year"/></td> <TD><xsl:apply-templates select=".//author.//editor"/></td> <TD><xsl:apply-templates select=".//title"/></td> </TR> <xsl:template match="author Editor Title Year"> <xsl:value-of select="."/><br/> Documents Multimedia - Restitution de documents (XSLT) ! (19)! Documents Multimedia - Restitution de documents (XSLT) ! (20)!

6 Example 5: comments "!" apply-templates instructions modify the default tree traversal performed by the XSLT processor "!" The attribute value of the «#match#» attribute of the last rule is an expression that uses the OR construct «# #»"!" Author Editor Title Year!!" This means that the same rule applies to each mentionned element name! Example 6: titles-and-language.xsl! <UL> <xsl:apply-templates select="product"/> </UL> <xsl:template match ="Product"> <LI> <xsl:value-of select="./*/title"/> <xsl:text> ( </xsl:text> <xsl:value-of select="./*/@language"/> <xsl:text> ) </xsl:text> </LI> Documents Multimedia - Restitution de documents (XSLT) ! (21)! Documents Multimedia - Restitution de documents (XSLT) ! (22)! Example 6: comments"!" The element <xsl:text> allows to generate text"!" Its content is the text value!!" Unlike text which is directly inserte, text generated by <xsl:text> "!" Keeps spaces!!" Does not interpret entities (such as &) in the output!!" The attribute disable-output-escaping="yes" allows to interpret entities in the output" Summary"!" An XSLT specification is a set of rules (<xsl:template> )"!" The match attribute indicates nodes for which the rule applies!!" The content of the element <xsl:template> specifies what must be generated in the output file; the elements that belong to the XSLT namespace are interpreted as instructions of the language, the others are simply copied.!!" The instruction <xsl:apply-templates> applies rules over the list of nodes specified using its select attribute"!" The instruction <xsl:value-of> allows to generate in the output file the content of a node from the input file"!" The instruction <xsl:text> allows to generate text in the output file, in a controled manner" Documents Multimedia - Restitution de documents (XSLT) ! (23)! Documents Multimedia - Restitution de documents (XSLT) ! (24)!

7 Example 6: sorted-catalog.xsl! <xsl:apply-templates select="./product"> <xsl:sort order="ascending" select="./*/title"/> </xsl:apply-templates> <P> <xsl:value-of select="./*/title"/> <xsl:text> - </xsl:text> <xsl:value-of select="./*/price"/> <xsl:text> </xsl:text> <xsl:value-of select="./*/price/@currency"/> </P> Example 6: comments"!" The element <xsl:sort>, that may occur in" <xsl:apply-templates> <xsl:for-each> " allows to sort elements"!" The attribute select="xpath" determines the elements that are going to be sorted!!" By default the sort follows the ascending alphabet order!!" The attribute order="descending" allows to reverse the sorting order!!" The attribute data-types="number" allows to modify the type of the considered data (default value is text)! Documents Multimedia - Restitution de documents (XSLT) ! (25)! Documents Multimedia - Restitution de documents (XSLT) ! (26)! Example 7: use-of-mode.xsl! <xsl:apply-templates mode ="toc" select=".//title"/> <H1>Details</H1> <xsl:apply-templates select="./product"/> <P> <xsl:apply-templates select="./*/title"/> <xsl:apply-templates select="./*/price"/> </P> <xsl:template match="price"> <I><xsl:value-of select="."/></i> Example 7: comments"!" If several distinct rules must be applied to the same source element in different contexts, we can use the mode attribute!" example: presentation of titles in the table of contents and in the detailed content!!" A rule <xsl:template... mode="name"> will only be applied in the context defined by! <xsl:apply-template... mode="name"> " <xsl:template match="price"> <xsl:template match="title" mode="toc"> <P><B><xsl:value-of select="."/></b></p> Documents Multimedia - Restitution de documents (XSLT) ! (27)! Documents Multimedia - Restitution de documents (XSLT) ! (28)!

8 Example 8: use-of-each.xsl! Example 8: comments"!" For performing iterations we can use <xsl:for-each> " <xsl:apply-templates select="./product"/> <P> <xsl:for-each select=".//author.//editor"> <I><xsl:value-of select="."/></i><br/> </xsl:for-each> <xsl:value-of select="./*/title"/> </P>!" The attribute select="xpath" determines the set of nodes to be processed"!" The same result can be achieved using <xsl:applytemplate>!!! Documents Multimedia - Restitution de documents (XSLT) ! (29)! Documents Multimedia - Restitution de documents (XSLT) ! (30)! Example 9: use-of-if.xsl! <UL> <xsl:apply-templates/> </UL> <P> <xsl:value-of select="./*/title"/> <xsl:if test="./*/@language='en'"> <B>(en anglais)</b> </xsl:if> </P> Example 9: comments"!" The element <xsl:if test="expr"> allows to generate output in a conditional manner"!" The evaluation of the (boolean) expression expr determines whether the output is generated or not!!" The element <xsl:choose> contains the elements:"!" <xsl:when test="expr">!!" <xsl:otherwise>! this allows to express conditional processing for several cases! Documents Multimedia - Restitution de documents (XSLT) ! (31)! Documents Multimedia - Restitution de documents (XSLT) ! (32)!

9 Today$s Outline - Pierre Geneves! Recall: basic principle of the XSLT execution model"!" More on XSLT"!" Rapid recall of the execution model!!" Some advanced techniques!!" A specific insight on the XSLT sublanguage used for selecting nodes from an XML document: XPath"!" Questions?" Documents Multimedia - Restitution de documents (XSLT) ! (33)! Documents Multimedia - Restitution de documents (XSLT) ! (34)! Example 10: generate-structured-doc.xsl! <STYLE TYPE="text/css"> p.ouvrage { margin: 2em; color: blue; font-size: 120%; } </STYLE > <BODY BGCOLOR="#FFFFCC"> <xsl:apply-templates select="./product"/> <xsl:element name="p"> <xsl:attribute name="class">ouvrage</xsl:attribute> <xsl:value-of select="./*/title"/> </xsl:element> Example 10: comments"!" The element <xsl:element> allows to generate an output element"!" The attribute name sets its name!!" This construct is useful for creating elements dynamically (for instance if the output element name depends on a source attribute)! <xsl:template match="..."> <xsl:element name="{@attr}"> <!-- content of the element --> </xsl:element> <xsl:template/>!" The element <xsl:attribute> allows to generate an attribute associated with the current element in the output "!" the attribute name sets its name!!" The content defines its value! Documents Multimedia - Restitution de documents (XSLT) ! (35)! Documents Multimedia - Restitution de documents (XSLT) ! (36)!

10 Example 11: use-of-copy.xsl! Example 11: comments"!" The element <xsl:copy> copies the current element" <xsl:element name="customizedcatalog"> <xsl:apply-templates = 'EN']"/> </xsl:element>!" The content of <xsl:copy> behaves like a rule (template)!!" The element <xsl:copy-of select="xpath"> allows to copy the specified sub-elements" <xsl:template match="book"> <xsl:copy-of select="."/> Documents Multimedia - Restitution de documents (XSLT) ! (37)! Documents Multimedia - Restitution de documents (XSLT) ! (38)! The Identity Transformation"!" The following stylesheet defines the identity transformation" <?xml version="1.0"?> <xsl:stylesheet version="1.0 xmlns:xsl=" <xsl:template match="@* node()"> <xsl:copy> <xsl:apply-templates select="@* node()"/> </xsl:copy> Generating Processing Instructions and Comments"!" Processing Instructions: the element <xsl:processing-instruction> allows to generate an XML instruction"!" The name attribute specifies the name of the instruction!!" The content of the element defines the other parameters!!" Comments: the element <xsl:comment> allows to generate an XML comment"!" The content of the element defines the content of the comment! </xsl:stylesheet> Documents Multimedia - Restitution de documents (XSLT) ! (39)! Documents Multimedia - Restitution de documents (XSLT) ! (40)!

11 XPath"!" A W3C recommendation"!" A path language for expressing node selection in an XML document"!" XPath is used in XSLT for specifying the value of the following attributes:" 1."match in <xsl:template> $" the template rule applies to nodes that match the XPath expression 2."select in <xsl:apply-templates>, <xsl:value-of>, <xsl:for-each>, <xsl:copy-of>, <xsl:sort> $" the evaluation of an XPath expression selects a set of nodes (elements or attributes) Sample Expressions for the match Attribute (1)"!" / : denotes the root of the document"!". : the current node (for which the rule applies)"!" e : an element <e>!" * : any element"!" f/e : an element <e> which is child of <f>!" f//e : an element <e> descendant of : an attribute a!" x y : either x or y!" e[s]: an element e which has a child s!" e[n] (where n is a number): the n-th element <e> Documents Multimedia - Restitution de documents (XSLT) ! (41)! Documents Multimedia - Restitution de documents (XSLT) ! (42)! Sample Expressions for the match Attribute (2)"!" e[f='v']: an element e whose child element f has value v"!" e[@a='v']: an element e whose attribute a has value v"!" id('v'): the (unique) element whose attribute ID="v"!" text(): a text pseudo-element"!" comment(): a comment"!" processing-instruction(): an instruction "!" processing-instruction("name") a specific instruction name"!" node(): a node (other than root or attribute)" XPath Expressions in select Attributes (1)"!!" From the context node, the expression returns a set of nodes"!" e : all elements <e> which are children of the current context node!!" XPath defines 13 axes for navigation:"!" self!!" child!!" descendant!!" descendant-or-self!!" parent!!" ancestor!!" ancestor-or-self!!" preceding-sibling!!" following-sibling!!" preceding!!" following!!" attribute!!" namespace!!" One may indicate the axis along which! we want to move:! axis::e!" When omitted, default axis is child" Documents Multimedia - Restitution de documents (XSLT) ! (43)! Documents Multimedia - Restitution de documents (XSLT) ! (44)!

12 XPath Expressions in select Attributes (2)"!" Example XPath Expressions in select Attributes (3)"!" Navigation steps can be composed, e.g.: company division department section member department section member member department section an ancestor a parent a preceding-sibling self a child a descendant a following-sibling!" At each step, nodes can be filtered, e.g child::e[child::f] Documents Multimedia - Restitution de documents (XSLT) ! (45)! Documents Multimedia - Restitution de documents (XSLT) ! (46)! Abbreviated Syntax"!" The following expressions are abbreviations"!" elt is equivalent to is equivalent to attribute::attr!!". is equivalent to self::node()!!".. is equivalent to parent::node()!!" // is equivalent to % /descendant-or-self::node()/! Other Expressions"!" XPath also allows the following operators"!" =,!=, <(<), <=(<=), >, >=!!" +, -, *, div, mod!!" and functions such as the following: (the list is nonexhaustive)"!" position(), last()!" round(e), floor(e), ceiling(), sum(e,...)!!" not(expr)!!" count(node-set)!" name(node-set), local-name(node-set)!" string-length(str), contains(sub,substr), substring(str,start,length) Documents Multimedia - Restitution de documents (XSLT) ! (47)! Documents Multimedia - Restitution de documents (XSLT) ! (48)!

13 Example 12: xpath-ancestor.xsl! <xsl:template match="/"> <TR> <TD><xsl:apply-templates select=".//year"/></td> <TD><xsl:apply-templates select=".//author.//editor"/></td> <TD><xsl:apply-templates select=".//title"/></td> </TR> <xsl:template match="author Editor Year"> <xsl:value-of select="."/><br/> <xsl:template match="title"> <xsl:value-of select="."/> <xsl:text> [ </xsl:text> <xsl:value-of select="ancestor::product/@productid"/> <xsl:text> ] </xsl:text> <BR/> Example 12: comments"!" This transformation is very similar to the one of Example 5 whose goal is to generate a table of 3 columns which respectively contain:"!" The publication year!!" The names of authors or editors!!" The title of the book!!" The difference is that here the product number is indicated, between brackets, just next to the book title"!" This information is accessed using the ancestor axis in an XPath expression! Documents Multimedia - Restitution de documents (XSLT) ! (49)! Documents Multimedia - Restitution de documents (XSLT) ! (50)! Think a moment "!" Recall XSLT execution model"!" Recall select attributes"!" Can you tell why the following example is not part of the archive?" <xsl:template match="book"> <p> <xsl:apply-templates select="."/> </p>! Example 13: xpath-last-function.xsl! <LI> <xsl:apply-templates select=".//author.//editor"/>: <xsl:value-of select="./*/title"/>. </LI> <xsl:template match="author Editor"> <xsl:value-of select="."/> <xsl:text>, </xsl:text> <xsl:template match="author [position()=last()] Editor [position()=last()]"> <xsl:value-of select="."/> Documents Multimedia - Restitution de documents (XSLT) ! (51)! Documents Multimedia - Restitution de documents (XSLT) ! (52)!

14 Example 13: comments"!" This example illustrates the use of the functions that allow to distinguish the processing of author elements and editor elements, according to their position."!" Remark: note the priorities for template instanciation:"!" Author [position()=last()] Editor [position()=last()]! Priorities for Template Rules"!" It may happens that a node of the source document matches multiple template rules"!" In this case, the most specific rule applies"!" Formally, the computation of priorities for electing the «#most specific#» rule is described in the XSLT specification" Documents Multimedia - Restitution de documents (XSLT) ! (53)! Documents Multimedia - Restitution de documents (XSLT) ! (54)! Definition of constants"!" The element <xsl:variable name="ident"> allows to define a constant"!" The content of the element defines the constant value!!" Such a variable can then be used"!" As element content % <xsl:value-of select="$ident"/>!!" As attribute value attr="{$ident}" Named Templates"!" A rule <xsl:template> can be named using the attribute name="rule" "!" Such a rule can be then explicitly invoked from another rule (like a procedure call) using the instruction! <xsl:call-template name="rule">!" Variables may be declared globally (in <xsl:stylesheet>) or locally (in <xsl:template>)" Documents Multimedia - Restitution de documents (XSLT) ! (55)! Documents Multimedia - Restitution de documents (XSLT) ! (56)!

15 Templates with parameters"!" It is possible to pass parameters to a rule"!" In the declaration of the rule, one must define <xsl:param name="ident">!" When the rule is invoked (in <xsl:template>) we use <xsl:withparam name="ident">!" In the rule, the parameter can be accessed using $ident Documents Multimedia - Restitution de documents (XSLT) ! (57)! Example 14: template-with-param.xsl! <xsl:element name="html"> <xsl:element name="body"> <xsl:attribute name="bgcolor">#ffffcc</xsl:attribute> <xsl:call-template name ="list"> <xsl:with-param name="thetitle">liste des livres</xsl:with-param> <xsl:with-param name="theelements" select="./product[book]"/> </xsl:call-template> <xsl:call-template name ="list"> <xsl:with-param name="thetitle">liste des actes de conferences </xsl:with-param> <xsl:with-param name="theelements" select="./product[proceedings]"/> </xsl:call-template> </xsl:element> </xsl:element> <xsl:template name="list"> <xsl:param name="thetitle"/> <xsl:param name="theelements"/> <xsl:element name="h2"> <xsl:value-of select="$thetitle"/> </xsl:element> <xsl:apply-templates select="$theelements"/> <P><xsl:value-of select="./*/title"/></p> Documents Multimedia - Restitution de documents (XSLT) ! (58)! Example 14: comments"!" This example illustrates the use of templates with parameters" Importing rules"!" The element <xsl:import href="url"> allows to import the rules from an external stylesheet"!" 2 parameters are passed (title and elements)!!" Remark: note the similarity w.r.t a «#classical#» approach for calling a procedure («#declarative#» vs «#procedural#» paradigms)!!" Such importations must occur at the beginning of <xsl:stylesheet>!" The element <xsl:include href="url"> allows to insert external rules inside a stylesheet" Documents Multimedia - Restitution de documents (XSLT) ! (59)! Documents Multimedia - Restitution de documents (XSLT) ! (60)!

16 Conclusion"!" Positive Aspects"!" XSLT is a very powerful declarative language!!" It allows to rapidly define simple/complex XML structure transformations!!" The language is functional (no side-effects)!!" XSLT processors exist and work very well!!" XSLT has contributed to the success and wide adoption of XML!!" Negative Aspects"!" The XSLT specification is quite long and complex (97 pages in english)!!" The language is hybrid (declarative and procedural)!!" There is currently no tool for helping the design, verification or maintenance of complex stylesheets!!" The language does not provide any static guarantee that the result of an XSLT stylesheet will be valid w.r.t a given output XML schema/dtd! $" the bad news: you have to be careful when developing as you are responsible $" the good news: you can earn a Ph.D. by designing such a tool " XSLT tools"!" There are many XSLT processors, commercial or opensource"!" For instance: Xalan ( An XSLT processor uses an XML parser"!" For instance Xerces ( With Xalan, the command for running a transformation looks like: java org.apache.xalan.xslt.process -in myfile.xml -xsl mytrans.xsl -out myres!" The «#XML Spy#»# editor includes an XSLT processor" Documents Multimedia - Restitution de documents (XSLT) ! (61)! Documents Multimedia - Restitution de documents (XSLT) ! (62)!

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 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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 and Databases XSLT Stylesheets and Transforms

XML and Databases XSLT Stylesheets and Transforms XML and Databases XSLT Stylesheets and Transforms Kim.Nguyen@nicta.com.au Lecture 11 1 / 38 extensible Stylesheet Language Transformations Outline 1 extensible Stylesheet Language Transformations 2 Templates

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

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

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

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

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

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

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

XSLT (part II) Mario Alviano A.Y. 2017/2018. University of Calabria, Italy 1 / 19 1 / 19 XSLT (part II) Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 19 1 Introduction 2 Variables, conditional constructs and iterations 3 Sorting and grouping 4 Named templates

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<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

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

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. 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

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

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

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

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

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

XPath Quick Reference

XPath Quick Reference 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

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

xmlns:gu="http://www.gu.au/empdtd" xmlns:uky="http://www.uky.edu/empdtd">

xmlns:gu=http://www.gu.au/empdtd xmlns:uky=http://www.uky.edu/empdtd> Namespaces Namespaces An XML document may use more than one DTD or schema Since each structuring document was developed independently, name clashes may appear The solution is to use a different prefix

More information

Generating Variants Using XSLT Tutorial

Generating Variants Using XSLT Tutorial Table of Contents 1. Overview... 1 2. About this tutorial... 1 3. Setting up the pure::variants project... 1 4. Setting up the feature model... 3 5. Setting up the family model... 4 6. Setting up the XSLT

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

XSLT. Patryk Czarnik. XML and Applications 2014/2015 Lecture

XSLT. Patryk Czarnik. XML and Applications 2014/2015 Lecture XSLT Patryk Czarnik XML and Applications 2014/2015 Lecture 10 15.12.2014 XSLT where does it come from? XSL Extensible Stylesheet Language Presentation of XML documents by transformation XSLT XSL Transformations

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

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

Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China

Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China PharmaSUG China 2018 Paper CD-72 Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China ABSTRACT US Food and Drug

More information

XSDs: exemplos soltos

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

More information

XSLT Version 2.0 is Turing-Complete: A Purely Transformation Based Proof

XSLT Version 2.0 is Turing-Complete: A Purely Transformation Based Proof XSLT Version 2.0 is Turing-Complete: A Purely Transformation Based Proof Ruhsan Onder and Zeki Bayram Department of Computer Engineering/Internet Technologies Research Center Eastern Mediterranean University

More information

XSLT. Lecture 38. Robb T. Koether. Mon, Apr 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, / 26

XSLT. Lecture 38. Robb T. Koether. Mon, Apr 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, / 26 XSLT Lecture 38 Robb T. Koether Hampden-Sydney College Mon, Apr 21, 2014 Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, 2014 1 / 26 1 XSLT 2 Running XSLT 3 XSLT Files 4 Output Modes 5 XSLT

More information

Advanced XQuery and XSLT

Advanced XQuery and XSLT NPRG036 XML Technologies Lecture 9 Advanced XQuery and XSLT 30. 4. 2018 Author: Irena Holubová Lecturer: Martin Svoboda http://www.ksi.mff.cuni.cz/~svoboda/courses/172-nprg036/ Lecture Outline XQuery Update

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

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

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

XML PRESENTATION OF DOCUMENTS

XML PRESENTATION OF DOCUMENTS Network Europe - Russia - Asia of Masters in Informatics as a Second Competence 159025-TEMPUS-1-2009-1-FR-TEMPUS-JPCR Sergio Luján Mora Department of Software and Computing Systems University of Alicante

More information

<?xml version = 1.0 encoding= windows-874?> <?xml-stylesheet type= text/css href= #xmldocs?> <style id= xmldocs > element-name{ } </style>

<?xml version = 1.0 encoding= windows-874?> <?xml-stylesheet type= text/css href= #xmldocs?> <style id= xmldocs > element-name{ } </style> XML Displaying Displaying XML: CSS A modern web browser and a cascading style sheet (CSS) may be used to view XML as if it were HTML A style must be defined for every XML tag, or the browser displays it

More information

8/1/2016. XSL stands for EXtensible Stylesheet Language. CSS = Style Sheets for HTML XSL = Style Sheets for XML. XSL consists of four parts:

8/1/2016. XSL stands for EXtensible Stylesheet Language. CSS = Style Sheets for HTML XSL = Style Sheets for XML. XSL consists of four parts: XSL stands for EXtensible Stylesheet Language. CSS = Style Sheets for HTML XSL = Style Sheets for XML http://www.w3schools.com/xsl/ kasunkosala@yahoo.com 1 2 XSL consists of four parts: XSLT - a language

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

Extreme Java G Session 3 - Sub-Topic 5 XML Information Rendering. Dr. Jean-Claude Franchitti

Extreme Java G Session 3 - Sub-Topic 5 XML Information Rendering. Dr. Jean-Claude Franchitti Extreme Java G22.3033-007 Session 3 - Sub-Topic 5 XML Information Rendering Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences 1 Agenda

More information

Developing High-Quality XSLT Stylesheets

Developing High-Quality XSLT Stylesheets XSLT and XQuery September 13, 2018 Developing High-Quality XSLT Stylesheets Priscilla Walmsley, Datypic, Inc. Class Outline Introduction...2 Clarity...8 Modularity... 11 Robustness...27 Other Improvements...35

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

Roxen CMS 5.4. XSLT Tutorial

Roxen CMS 5.4. XSLT Tutorial Roxen CMS 5.4 XSLT Tutorial 2014-03-11 www.roxen.com Roxen Internet Software AB 2011 Roxen Internet Software AB. All rights reserved. Under the copyright laws, this document may not be copied, in whole

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

Sample Text Point Instruction

Sample Text Point Instruction TSMAD29/DIPWG7 11.11B Paper for Consideration by TSMAD/DIPWG Potential Adjustments to S-100 Part 9 Portrayal - Text Styles. Submitted by: CARIS Executive Summary: This paper discusses the introduction

More information

Data Services (I): XML Transformation and Query Techniques

Data Services (I): XML Transformation and Query Techniques Data Services (I): XML Transformation and Query Techniques Helen Paik School of Computer Science and Engineering University of New South Wales Week 8 H. Paik (CSE, UNSW) XML Week 8 1 / 59 Web services

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

~ 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

Custom Tables with the LandXML Report Extension David Zavislan, P.E.

Custom Tables with the LandXML Report Extension David Zavislan, P.E. December 2-5, 2003 MGM Grand Hotel Las Vegas Custom Tables with the LandXML Report Extension David Zavislan, P.E. CV41-2 Learn some basic concepts of LandXML and the extensible Stylesheet Language (XSL)

More information

WebSphere DataPower SOA Appliances and XSLT (Part 2 of 2) - Tips and Tricks

WebSphere DataPower SOA Appliances and XSLT (Part 2 of 2) - Tips and Tricks IBM Software Group WebSphere DataPower SOA Appliances and XSLT (Part 2 of 2) - Tips and Tricks Hermann Stamm-Wilbrandt (stammw@de.ibm.com) DataPower XML Compiler Developer, L3 8 July 2010 WebSphere Support

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

Section A: Multiple Choice

Section A: Multiple Choice Section A: Multiple Choice Question 1 Each item has only one correct answer. Two marks for each correct answer, zero marks for each incorrect answer. Use the supplied sheet to record a single response

More information

4. Unit: Transforming XML with XSLT

4. Unit: Transforming XML with XSLT Semistructured Data and XML 28 4. Unit: Transforming XML with XSLT Exercise 4.1 (XML to HTML) Write an XSLT routine performing the following task: Map the following country data for each country to an

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

store process communicate

store process communicate store process communicate 2011-10-04 store as XML communicate using HTML and CSS process with XSL

More information

Copyright 2005, by Object Computing, Inc. (OCI). All rights reserved. Database to Web

Copyright 2005, by Object Computing, Inc. (OCI). All rights reserved. Database to Web Database To Web 10-1 The Problem Need to present information in a database on web pages want access from any browser may require at least HTML 4 compatibility Want to separate gathering of data from formatting

More information

Translating XSLT into XQuery

Translating XSLT into XQuery Translating into Albin Laga, Praveen Madiraju, Darrel A. Mazzari and Gowri Dara Department of Mathematics, Statistics, and Computer Science Marquette University P.O. Box 1881, Milwaukee, WI 53201 albin.laga,

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

Course: The XPath Language

Course: The XPath Language 1 / 30 Course: The XPath Language Pierre Genevès CNRS University of Grenoble Alpes, 2017 2018 2 / 30 Why XPath? Search, selection and extraction of information from XML documents are essential for any

More information

Proposal: Codelists 1.0 April 2003

Proposal: Codelists 1.0 April 2003 Proposal: Codelists 1.0 April 2003 Proposal: Codelists / 1.0 / April 2003 1 Document Control Abstract In many cases, there is a need to use sets of pre-defined codes (such as country and currency codes)

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

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

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while

One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while 1 One of the main selling points of a database engine is the ability to make declarative queries---like SQL---that specify what should be done while leaving the engine to choose the best way of fulfilling

More information

DITA 1.3 Feature Article A Brief Introduction to XSL for Processing DITA Content

DITA 1.3 Feature Article A Brief Introduction to XSL for Processing DITA Content DITA 1.3 Feature Article A Brief Introduction to XSL for Processing DITA Content An OASIS DITA Adoption Technical Committee Publication Chunk1739435240 iii Contents Chunk1739435240 Part I What is XSL?

More information