SlideShare a Scribd company logo
1 of 11
Q5M1 - XML Dudy Fathan Ali S.Kom
Displaying Data with XSLT
Q5M1 - XML
Dudy Fathan Ali, S.Kom (DFA)
2015
CEP - CCIT
Fakultas Teknik Universitas Indonesia
Performing Conditional Formatting
Q5M1 - XML Dudy Fathan Ali S.Kom
Conditional formatting refers to the formatting of data based on a
specific condition.
The two elements used for conditional formatting are:
if
choose
Performing Conditional Formatting
Q5M1 - XML Dudy Fathan Ali S.Kom
Conditional formatting refers to the formatting of data based on a
specific condition.
The two elements used for conditional formatting are:
if
choose
Provides an if-then construct.
Follows the syntax:
<xsl:if test="condition">
[actions to be performed if the
condition is true]
</xsl:if>
Performing Conditional Formatting
Q5M1 - XML Dudy Fathan Ali S.Kom
Conditional formatting refers to the formatting of data based on a
specific condition.
The two elements used for conditional formatting are:
if
choose
Enables you to choose from two or more
possible courses of action by testing multiple
conditions.
Follows the syntax:
<xsl:choose>
<xsl:when>
[action to be taken]
</xsl:when>
:
:
<xsl:otherwise>
[action to be taken]
</xsl:otherwise>
</xsl:choose>
Identifying Comparison and Boolean Operators
Q5M1 - XML Dudy Fathan Ali S.Kom
Used with the if and choose elements to narrow down the
formatting criteria.
The following table lists various comparison and Boolean
operators.
Operator Meaning Example
Equal to=
PRICE[. = 20]
PRODUCTNAME[. = ‘Mini Bus’]
!=
&lt;
and
&lt;=
&gt;=
or
&gt;
Not equal to
Less than
Less than or equal to
Greater than
Logical AND
Logical OR
Greater than or equal to
PRICE[. != 20]
PRODUCTNAME[. != ‘Barbie Doll’]
PRICE[. &lt; 20]
PRICE[. &gt; 20]
PRICE[. &lt;= 20]
PRICE[. &gt;= 20]
PRICE[. &gt 20 and . &lt; 30]
PRICE[. = 20 or . = 45]
PRICE[not(. = 30)]not Negation Operator
Using XPath
Q5M1 - XML Dudy Fathan Ali S.Kom
XPath:
Is used to search and retrieve information from an XML file.
Treats an XML document as a tree of interrelated branches and
nodes, as shown in the following figure.
PRODUCTDATA
PRODUCT
PRODUCTNAME DESCRIPTION PRICE QOHPRODID=“P001”
CATEGORY
=“TOY”
Mini Bus
This toy is for
children aged
4 and above
5475
Describing XPath Expressions
Q5M1 - XML Dudy Fathan Ali S.Kom
XPath expressions can be used to retrieve data based on specific
conditions.
XPath expressions identify the nodes in an XML document based
on their names and values.
The following table lists the operators that can be used to create
XPath expressions.
Operator/Special
Character
Example Description
/ /PRODUCTDATA Selects the immediate child elements of
PRODUCTDATA. If this operator occurs at the start
of the pattern, it indicates that the child elements
should be selected from the root node.
// //PRODUCTNAME Searches for the specified element at any node
level.
. .PRODUCTNAME Indicates the current context.
.. ../PRODUCTNAME Selects the PRODUCTNAME element, which exists
within the parent of the current element.
* * Selects all elements.
Describing XPath Expressions
Q5M1 - XML Dudy Fathan Ali S.Kom
Operator/Speci
al Character
Example Description
@ @PRODUCTID Used as a prefix for the attribute.
@* @* Selects all attributes.
: : Separates the namespace prefix from the
element or attribute name.
( ) (PRICE*QUANTITY) Used to group operations.
[ ] [@PRODUCTID='P00
1']
Applies a filter pattern.
+ num1 + num2 Returns the sum of two numbers.
- num1 - num2 Returns the difference of two numbers.
* num1 * num2 Returns the product of two numbers.
div num1 div num2 Returns the quotient of two numbers.
mod num1 mod num2 Returns the modulus, that is, the remainder of
integer division.
Identifying Comparison and Boolean Operators
Q5M1 - XML Dudy Fathan Ali S.Kom
Save as : Latihan10.xml
Identifying Comparison and Boolean Operators
Q5M1 - XML Dudy Fathan Ali S.Kom
Save as : Latihan10.xsl
Q5M1 - XML Dudy Fathan Ali S.Kom
Thank You!
Dudy Fathan Ali S.Kom
dudy.fathan@eng.ui.ac.id

More Related Content

What's hot (19)

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Dtd
DtdDtd
Dtd
 
Xml basics
Xml basicsXml basics
Xml basics
 
Xml basics for beginning
Xml basics for beginningXml basics for beginning
Xml basics for beginning
 
XML
XMLXML
XML
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xmlXml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
 
XML Presentation-2
XML Presentation-2XML Presentation-2
XML Presentation-2
 
XML
XMLXML
XML
 
Xml schema
Xml schemaXml schema
Xml schema
 
Xml Presentation-3
Xml Presentation-3Xml Presentation-3
Xml Presentation-3
 
Basics of XML
Basics of XMLBasics of XML
Basics of XML
 
Xml Presentation-1
Xml Presentation-1Xml Presentation-1
Xml Presentation-1
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
00 introduction
00 introduction00 introduction
00 introduction
 
DTD
DTDDTD
DTD
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
03 x files
03 x files03 x files
03 x files
 

Viewers also liked

Unleashing the Power of XSLT: Catalog Records in Batch
Unleashing the Power of XSLT: Catalog Records in BatchUnleashing the Power of XSLT: Catalog Records in Batch
Unleashing the Power of XSLT: Catalog Records in Batchc7002593
 
The Mystical Principles of XSLT: Enlightenment through Software Visualization
The Mystical Principles of XSLT: Enlightenment through Software VisualizationThe Mystical Principles of XSLT: Enlightenment through Software Visualization
The Mystical Principles of XSLT: Enlightenment through Software Visualizationevanlenz
 
Applying an IBM SOA Approach to Manual Processes Automation
Applying an IBM SOA Approach to Manual Processes AutomationApplying an IBM SOA Approach to Manual Processes Automation
Applying an IBM SOA Approach to Manual Processes AutomationProlifics
 
Xml part4
Xml part4Xml part4
Xml part4NOHA AW
 
Xml part5
Xml part5Xml part5
Xml part5NOHA AW
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSCarol McDonald
 
SOA Governance and WebSphere Service Registry and Repository
SOA Governance and WebSphere Service Registry and RepositorySOA Governance and WebSphere Service Registry and Repository
SOA Governance and WebSphere Service Registry and RepositoryIBM Sverige
 
Open Id, O Auth And Webservices
Open Id, O Auth And WebservicesOpen Id, O Auth And Webservices
Open Id, O Auth And WebservicesMyles Eftos
 
WebService-Java
WebService-JavaWebService-Java
WebService-Javahalwal
 
RESTful services
RESTful servicesRESTful services
RESTful servicesgouthamrv
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WSIndicThreads
 
OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerShiu-Fun Poon
 

Viewers also liked (20)

4 xslt
4   xslt4   xslt
4 xslt
 
Unleashing the Power of XSLT: Catalog Records in Batch
Unleashing the Power of XSLT: Catalog Records in BatchUnleashing the Power of XSLT: Catalog Records in Batch
Unleashing the Power of XSLT: Catalog Records in Batch
 
Web Services
Web ServicesWeb Services
Web Services
 
The Mystical Principles of XSLT: Enlightenment through Software Visualization
The Mystical Principles of XSLT: Enlightenment through Software VisualizationThe Mystical Principles of XSLT: Enlightenment through Software Visualization
The Mystical Principles of XSLT: Enlightenment through Software Visualization
 
Applying an IBM SOA Approach to Manual Processes Automation
Applying an IBM SOA Approach to Manual Processes AutomationApplying an IBM SOA Approach to Manual Processes Automation
Applying an IBM SOA Approach to Manual Processes Automation
 
Xml part4
Xml part4Xml part4
Xml part4
 
Xml part5
Xml part5Xml part5
Xml part5
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
SOA Governance and WebSphere Service Registry and Repository
SOA Governance and WebSphere Service Registry and RepositorySOA Governance and WebSphere Service Registry and Repository
SOA Governance and WebSphere Service Registry and Repository
 
Open Id, O Auth And Webservices
Open Id, O Auth And WebservicesOpen Id, O Auth And Webservices
Open Id, O Auth And Webservices
 
XSLT for Web Developers
XSLT for Web DevelopersXSLT for Web Developers
XSLT for Web Developers
 
Web Services
Web ServicesWeb Services
Web Services
 
Web services
Web servicesWeb services
Web services
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
Siebel Web Service
Siebel Web ServiceSiebel Web Service
Siebel Web Service
 
CTDA Workshop on XSL
CTDA Workshop on XSLCTDA Workshop on XSL
CTDA Workshop on XSL
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
 
XSLT
XSLTXSLT
XSLT
 
OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPower
 

Similar to XML - Displaying Data ith XSLT

Xml session07
Xml session07Xml session07
Xml session07Niit Care
 
03 sm3 xml_xp_06
03 sm3 xml_xp_0603 sm3 xml_xp_06
03 sm3 xml_xp_06Niit Care
 
Rendering XML Document
Rendering XML DocumentRendering XML Document
Rendering XML Documentyht4ever
 
Xslt by asfak mahamud
Xslt by asfak mahamudXslt by asfak mahamud
Xslt by asfak mahamudAsfak Mahamud
 
(151030) The X files
(151030) The X files(151030) The X files
(151030) The X filesPaul Filkin
 
An Architecture for an XML-Template Engine enabling Safe Authoring
An Architecture for an XML-Template Engine enabling Safe AuthoringAn Architecture for an XML-Template Engine enabling Safe Authoring
An Architecture for an XML-Template Engine enabling Safe AuthoringFalk Hartmann
 
Rendering XML Documents
Rendering XML DocumentsRendering XML Documents
Rendering XML Documentsyht4ever
 
Creating xml publisher documents with people code
Creating xml publisher documents with people codeCreating xml publisher documents with people code
Creating xml publisher documents with people codeRandall Groncki
 
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriyaIntegrative Programming and Technology Chapter 4- Dr. J. VijiPriya
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriyaVijiPriya Jeyamani
 
Unit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptxUnit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptxNEHARAJPUT239591
 
ibm_research_aug_8_03
ibm_research_aug_8_03ibm_research_aug_8_03
ibm_research_aug_8_03Attila Barta
 

Similar to XML - Displaying Data ith XSLT (20)

Xml session07
Xml session07Xml session07
Xml session07
 
03 sm3 xml_xp_06
03 sm3 xml_xp_0603 sm3 xml_xp_06
03 sm3 xml_xp_06
 
Session 4
Session 4Session 4
Session 4
 
Rendering XML Document
Rendering XML DocumentRendering XML Document
Rendering XML Document
 
Xslt by asfak mahamud
Xslt by asfak mahamudXslt by asfak mahamud
Xslt by asfak mahamud
 
Day2 xslt x_path_xquery
Day2 xslt x_path_xqueryDay2 xslt x_path_xquery
Day2 xslt x_path_xquery
 
Xml session
Xml sessionXml session
Xml session
 
Stax parser
Stax parserStax parser
Stax parser
 
Xml and DTD's
Xml and DTD'sXml and DTD's
Xml and DTD's
 
(151030) The X files
(151030) The X files(151030) The X files
(151030) The X files
 
An Architecture for an XML-Template Engine enabling Safe Authoring
An Architecture for an XML-Template Engine enabling Safe AuthoringAn Architecture for an XML-Template Engine enabling Safe Authoring
An Architecture for an XML-Template Engine enabling Safe Authoring
 
Rendering XML Documents
Rendering XML DocumentsRendering XML Documents
Rendering XML Documents
 
Xml Session No 1
Xml Session No 1Xml Session No 1
Xml Session No 1
 
Creating xml publisher documents with people code
Creating xml publisher documents with people codeCreating xml publisher documents with people code
Creating xml publisher documents with people code
 
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriyaIntegrative Programming and Technology Chapter 4- Dr. J. VijiPriya
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
XPath Injection
XPath InjectionXPath Injection
XPath Injection
 
Unit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptxUnit2_XML_S_SS_US Data_CS19414.pptx
Unit2_XML_S_SS_US Data_CS19414.pptx
 
ibm_research_aug_8_03
ibm_research_aug_8_03ibm_research_aug_8_03
ibm_research_aug_8_03
 

More from Dudy Ali

Understanding COM+
Understanding COM+Understanding COM+
Understanding COM+Dudy Ali
 
Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Dudy Ali
 
Java CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseJava CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseDudy Ali
 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVADudy Ali
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NETDudy Ali
 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XMLDudy Ali
 
Pengantar XML DOM
Pengantar XML DOMPengantar XML DOM
Pengantar XML DOMDudy Ali
 
Pengantar ADO.NET
Pengantar ADO.NETPengantar ADO.NET
Pengantar ADO.NETDudy Ali
 
Database Connectivity with JDBC
Database Connectivity with JDBCDatabase Connectivity with JDBC
Database Connectivity with JDBCDudy Ali
 
Algorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma PengurutanAlgorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma PengurutanDudy Ali
 
Algorithm & Data Structure - Pengantar
Algorithm & Data Structure - PengantarAlgorithm & Data Structure - Pengantar
Algorithm & Data Structure - PengantarDudy Ali
 
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesObject Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesDudy Ali
 
Object Oriented Programming - Inheritance
Object Oriented Programming - InheritanceObject Oriented Programming - Inheritance
Object Oriented Programming - InheritanceDudy Ali
 
Object Oriented Programming - File Input & Output
Object Oriented Programming - File Input & OutputObject Oriented Programming - File Input & Output
Object Oriented Programming - File Input & OutputDudy Ali
 
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsObject Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsDudy Ali
 
Object Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & EncapsulationObject Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & EncapsulationDudy Ali
 
Web Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman WebWeb Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman WebDudy Ali
 
Web Programming Syaria - PHP
Web Programming Syaria - PHPWeb Programming Syaria - PHP
Web Programming Syaria - PHPDudy Ali
 
Software Project Management - Project Management Knowledge
Software Project Management - Project Management KnowledgeSoftware Project Management - Project Management Knowledge
Software Project Management - Project Management KnowledgeDudy Ali
 
Software Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen ProyekSoftware Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen ProyekDudy Ali
 

More from Dudy Ali (20)

Understanding COM+
Understanding COM+Understanding COM+
Understanding COM+
 
Distributed Application Development (Introduction)
Distributed Application Development (Introduction)Distributed Application Development (Introduction)
Distributed Application Development (Introduction)
 
Java CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseJava CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server Database
 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVA
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XML
 
Pengantar XML DOM
Pengantar XML DOMPengantar XML DOM
Pengantar XML DOM
 
Pengantar ADO.NET
Pengantar ADO.NETPengantar ADO.NET
Pengantar ADO.NET
 
Database Connectivity with JDBC
Database Connectivity with JDBCDatabase Connectivity with JDBC
Database Connectivity with JDBC
 
Algorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma PengurutanAlgorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Algoritma Pengurutan
 
Algorithm & Data Structure - Pengantar
Algorithm & Data Structure - PengantarAlgorithm & Data Structure - Pengantar
Algorithm & Data Structure - Pengantar
 
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesObject Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference Types
 
Object Oriented Programming - Inheritance
Object Oriented Programming - InheritanceObject Oriented Programming - Inheritance
Object Oriented Programming - Inheritance
 
Object Oriented Programming - File Input & Output
Object Oriented Programming - File Input & OutputObject Oriented Programming - File Input & Output
Object Oriented Programming - File Input & Output
 
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & DestructorsObject Oriented Programming - Constructors & Destructors
Object Oriented Programming - Constructors & Destructors
 
Object Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & EncapsulationObject Oriented Programming - Abstraction & Encapsulation
Object Oriented Programming - Abstraction & Encapsulation
 
Web Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman WebWeb Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - Pengenalan Halaman Web
 
Web Programming Syaria - PHP
Web Programming Syaria - PHPWeb Programming Syaria - PHP
Web Programming Syaria - PHP
 
Software Project Management - Project Management Knowledge
Software Project Management - Project Management KnowledgeSoftware Project Management - Project Management Knowledge
Software Project Management - Project Management Knowledge
 
Software Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen ProyekSoftware Project Management - Proses Manajemen Proyek
Software Project Management - Proses Manajemen Proyek
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

XML - Displaying Data ith XSLT

  • 1. Q5M1 - XML Dudy Fathan Ali S.Kom Displaying Data with XSLT Q5M1 - XML Dudy Fathan Ali, S.Kom (DFA) 2015 CEP - CCIT Fakultas Teknik Universitas Indonesia
  • 2. Performing Conditional Formatting Q5M1 - XML Dudy Fathan Ali S.Kom Conditional formatting refers to the formatting of data based on a specific condition. The two elements used for conditional formatting are: if choose
  • 3. Performing Conditional Formatting Q5M1 - XML Dudy Fathan Ali S.Kom Conditional formatting refers to the formatting of data based on a specific condition. The two elements used for conditional formatting are: if choose Provides an if-then construct. Follows the syntax: <xsl:if test="condition"> [actions to be performed if the condition is true] </xsl:if>
  • 4. Performing Conditional Formatting Q5M1 - XML Dudy Fathan Ali S.Kom Conditional formatting refers to the formatting of data based on a specific condition. The two elements used for conditional formatting are: if choose Enables you to choose from two or more possible courses of action by testing multiple conditions. Follows the syntax: <xsl:choose> <xsl:when> [action to be taken] </xsl:when> : : <xsl:otherwise> [action to be taken] </xsl:otherwise> </xsl:choose>
  • 5. Identifying Comparison and Boolean Operators Q5M1 - XML Dudy Fathan Ali S.Kom Used with the if and choose elements to narrow down the formatting criteria. The following table lists various comparison and Boolean operators. Operator Meaning Example Equal to= PRICE[. = 20] PRODUCTNAME[. = ‘Mini Bus’] != &lt; and &lt;= &gt;= or &gt; Not equal to Less than Less than or equal to Greater than Logical AND Logical OR Greater than or equal to PRICE[. != 20] PRODUCTNAME[. != ‘Barbie Doll’] PRICE[. &lt; 20] PRICE[. &gt; 20] PRICE[. &lt;= 20] PRICE[. &gt;= 20] PRICE[. &gt 20 and . &lt; 30] PRICE[. = 20 or . = 45] PRICE[not(. = 30)]not Negation Operator
  • 6. Using XPath Q5M1 - XML Dudy Fathan Ali S.Kom XPath: Is used to search and retrieve information from an XML file. Treats an XML document as a tree of interrelated branches and nodes, as shown in the following figure. PRODUCTDATA PRODUCT PRODUCTNAME DESCRIPTION PRICE QOHPRODID=“P001” CATEGORY =“TOY” Mini Bus This toy is for children aged 4 and above 5475
  • 7. Describing XPath Expressions Q5M1 - XML Dudy Fathan Ali S.Kom XPath expressions can be used to retrieve data based on specific conditions. XPath expressions identify the nodes in an XML document based on their names and values. The following table lists the operators that can be used to create XPath expressions. Operator/Special Character Example Description / /PRODUCTDATA Selects the immediate child elements of PRODUCTDATA. If this operator occurs at the start of the pattern, it indicates that the child elements should be selected from the root node. // //PRODUCTNAME Searches for the specified element at any node level. . .PRODUCTNAME Indicates the current context. .. ../PRODUCTNAME Selects the PRODUCTNAME element, which exists within the parent of the current element. * * Selects all elements.
  • 8. Describing XPath Expressions Q5M1 - XML Dudy Fathan Ali S.Kom Operator/Speci al Character Example Description @ @PRODUCTID Used as a prefix for the attribute. @* @* Selects all attributes. : : Separates the namespace prefix from the element or attribute name. ( ) (PRICE*QUANTITY) Used to group operations. [ ] [@PRODUCTID='P00 1'] Applies a filter pattern. + num1 + num2 Returns the sum of two numbers. - num1 - num2 Returns the difference of two numbers. * num1 * num2 Returns the product of two numbers. div num1 div num2 Returns the quotient of two numbers. mod num1 mod num2 Returns the modulus, that is, the remainder of integer division.
  • 9. Identifying Comparison and Boolean Operators Q5M1 - XML Dudy Fathan Ali S.Kom Save as : Latihan10.xml
  • 10. Identifying Comparison and Boolean Operators Q5M1 - XML Dudy Fathan Ali S.Kom Save as : Latihan10.xsl
  • 11. Q5M1 - XML Dudy Fathan Ali S.Kom Thank You! Dudy Fathan Ali S.Kom dudy.fathan@eng.ui.ac.id