This document provides an overview of Extensible Stylesheet Language Transformations (XSLT). It discusses how XSLT is used to transform XML documents and style their presentation. Key points include:
- XSLT uses XPath expressions to select nodes or node-sets from an XML document and then outputs the results as a new XML document that describes how to display the data.
- XSLT transformations involve parsing the source XML into a tree structure, transforming the data from the input structure to the desired output structure, and then serializing the result tree.
- XSLT stylesheets use elements like <xsl:template> and <xsl:apply-templates> to define template rules for matching
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
2. XML A QUICK RECAP
XML (eXtensible Markup Language) adds information to text
files, using tags and attributes [example1], [example2]
Tag names are defined for a specific document type.
Uses the Unicode character set
Designed to be easily processed by machine while remaining
readable.
3. WHAT IS XSL?
XSL (Extensible StyleSheet
Language)is a W3C specification
that describes a method for
visually presenting XML
documents.
4. PRESENTATION OF
XML
Two solutions for styling: CSS (Cascading Style Sheets and
html) and
XSLT (eXtensible Stylesheet Transformation).
Required that presentation is separate.
5. HOW XSL HELPS IN
PRESENTATION?
XSL is an alternative to CSS that
allows greater control over the
presentation of the XML data.
6. WHAT CAN IT DO?
like CSS allow changing presentation
without changing the XML source, and
display documents on various media.
features (writing modes, text
alignment, hyphenation), complex
page layout, footnotes, automatic
generation of content (index)
7. WHO IS IT FOR?
Applications that require high-level
quality formatting.
Publishing industry (books, technical
documentation)
Publication on different media:
paper, web, mobile devices(One data
multiple views).
8. HOW XML DATA CAN BE
TRANSFORMED USING
XSLT?
a conversion of XML data into a tree structure, e.g. using an
XML parser conformant to– Document Object Model (DOM) or
Simple Api for XML (SAX).
9. HOW XML DATA CAN BE
TRANSFORMED USING
XSLT?
A structural transformation of the data: from the input to the
desired output structure– involves selecting-projecting-joining,
aggregating, grouping, sorting data– XSLT vs. custom
applications: factoring out common subtasks and present them
astransformation rules in a high-level declarative language.
11. XSLT PROCESS
Source tree
Original XML file
Result tree
The result tree is an XML
document in which the markup
has information about how to
display the document: what font
to use, the size of a page, etc.
12. ADDITIONAL
FEATURES
XSL uses CSS properties to express formatting information, and uses
the CSS inheritance model.
XSL can import images and other types of known XML documents:
SVG and MathML.
Renderer( in case of web it is the browser ) can add capability to
handle other namespaces.
13. XSLT VARIABLES
global variables - accesible throughout the whole stylesheet.
local variables - available only within a particular template body.
variable name and value defined with XSLT element <xsl:variable>,
e.g.
<xsl:variable name=’’sum’’ value=’’0’’/>
can be referenced in XPath expressions as $sum.
14. PARAMETERS
global parameters - set from outside the stylesheet, e.g. command
line, API. (defined with XSLT element <xsl:param>).
local parameters - available only within a template.(defined with
XSLT element <xsl:with-param>).
15. EXPRESSIONS
Evaluated in a context, consisting of a static and dynamic context.
static context - depends on where the expression appears.
set of namespace declarations in force at the point where the expression is written.
set of variable declarations in scope at the point where the expression is written.
set of functions available to be called.
base URI of the stylesheet element containing the expression. for document() function.
dynamic context - depends on the processing state at the time of
expression evaluation.
current values of the variables in scope.
current location in the source tree, i.e.
current node - the node currently being processed.
context node - different from previous only for qualifiers inside expressions.
context position - position in the current node list.
context size - size of the current node list.
16. STRUCTURE
<xsl:stylesheet> and <xsl:transform> elements. the outermost
elements of any stylesheet.
<?xsl:stylesheet?> processing instruction. used within an XML
source to identify the stylesheet that should be used to process it.
stylesheet modules, using
<xsl:include> - textual inclusion of the referenced stylesheet module.
<xsl:import> - the definitions in the imported module have lower import
precedence.
embedded stylesheets - inluded within another XML document,
typically the document whose style it is defining.
17. ELEMENTS
define template rules and control the way they are invoked,
<xsl:template>, <xsl:apply-templates>, <xsl:call-template>.
define the structure of a stylesheet: <xsl:stylesheet>, <xsl:include>,
<xsl:import>
generate output: <xsl:value-of>, <xsl:element>, <xsl:attribute>,
<xsl:text>,<xsl:comment>, <xsl:processing-instruction>
define variables and parameters: <xsl:variable>, <xsl:param>, <xsl:with-
param>
copy information from the source to the result: <xsl:copy>, <xsl:copy-of>
conditional processing and iteration:<xsl:if>, <xsl:choose>, <xsl:when>,
<xsl:otherwise>, <xsl:for-each>
sort and number: <xsl:sort>, <xsl:number>
control the final output format: <xsl:output>, <xsl:document>
25. WHAT IS XPATH?
A language designed to be used by both
XSL Transformations (XSLT) and XPointer.
Provides common syntax and semantics for
functionality shared between XSLT and
XPointer.
Primary purpose: Address ‘parts’ of an
XML document, and provide basic facilities
for manipulation of strings, numbers and
booleans.
W3C Recommendation. November 16,
1999
Latest version:
http://www.w3.org/TR/xpath
27. INTRODUCTION
XPath uses a compact, string-based, rather than XML element-based
syntax.
Operates on the abstract, logical structure of an XML document (tree
of nodes) rather than its surface syntax.
Uses a path notation (like URLs) to navigate through this hierarchical
tree structure.
Introductio
n
28. INTRODUCTION CONT.
Defines a way to compute a string-value for each type of node:
element, attribute, text.
Supports Namespaces.
Name of a node (a pair consisting of a local part and namespace
URI).
Expression (Expr) is the primary syntactic construct.
Introductio
n
29. DATA MODEL
Treats an XML document as a logical tree
This tree consists of 7 nodes:
Root Node – the root of the document
Element Nodes – one for each element in the
document
Unique ID’s
Attribute Nodes
Namespace Nodes
Processing Instruction Nodes
Comment Nodes
Text Nodes
The tree structure is ordered and reads
from top to bottom and left to right
Data Model
30. DATA MODEL EXAMPLE
For this simple doc:
<doc>
<?Pub Caret?>
<para>Some <em>emphasis</em> here. </para>
<para>Some more stuff.</para>
</doc>
Might be represented as:
root
<doc>
<?pi?> <para> <para>
text <em> text text
text
Data Model
31. EXPRESSION
Evaluated to yield an object of 4 basic types.
node-set (unordered collection of nodes w/o
duplicates).
boolean (true/false)
number (float)
string (sequence of UCS chars)
Evaluation occurs with respect to a context.
(XSLT/XPointer specified context)
Parsed by dividing the character string into
tokens and then parsing the resulting sequence of
tokens.
Location paths select a set of nodes relative to the
context node.
Expression
32. LOCATION PATHS
LocationPath (most important construct) describes
a path from 1 point to another.
Analogy: Set of street directions.
“Second store on the left after the third light”
LocationPath provides the mechanism for
‘addressing’ items in an XML doc
Two types of paths: Relative & Absolute
Composed of a series of steps (1 or more) and
optional predicates
LocationPath
33. LOCATION PATHS
General syntax:
LocationPath ::= RelativeLocationPath
| AbsoluteLocationPath
Verbose syntax (has syntactic abbreviations for common cases)
Examples (unabbreviated)
child::para selects the para element children of the context node
child::* selects all element children of the context node
attribute::name selects the name attribute of the context node
ancestor::div selects all div ancestors of the context node
self::para selects the context node if it is a para element
(otherwise selects nothing)
child::*/child::para selects all para grandchildren of the context node
/ selects the document root
(which is always the parent of the document element)
LocationPat
h
34. LOCATION STEPS
3 parts
axis (specifies relationship btwn selected nodes and the context node)
node test (specifies the node type and expanded-name)
0 or more predicates (arbitrary expressions to refine the selected set of
nodes)
Syntax:
Step ::= Axis Specifier NodeTest Predicate*
| AbbreviatedStep
Axis Specifier ::= AxisName ‘::’
|AbbreviatedAxisSpecifier
ex: child::para[position( )=1]
=>child is the name of the axis, para is the node test, and [position()=1] is
a predicate
Generate an initial node-set from axis (relationship to context node) and
node-test (node-type and expanded-name), then filter that node-set by
each of the predicates.
ex: descendant::para
=>selects the para element descendants of the context node.
LocationPath
35. LOCATION STEPS
Axes
13 axes defined in XPath
Ancestor, ancestor-or-self
Attribute
Child
Descendant, descendant-or-self
Following
Preceding
Following-sibling, preceding-sibling
Namespace
Parent
Self
Node test
Identifies type of node. Evaluates to true/false
Can be a name or function to evaluate/verify type
Predicate
XPath boolean expressions in square brackets following
the basis(axis & node test)
36. EXAMPLES
Axis and Node Test:
child::para selects the para elements that are children of the
context node
preceding-sibling::para selects the preceding para
elements that are siblings to the context node
Basis and Predicate:
child::para[3] selects the 3rd para of the children of the
context node
child::para[attribute::type=“warning”] selects all para
children of the context node that have a type attribute with value
warning
Para[@type=“warning”][5] selects the fifth para child of
the context node that has a type attribute with value warning
LocationPath
37. ABBREVIATED SYNTAX
child:: can be omitted from a location step.
(child is the default axis)
div/para is equivalent to child::div/child::para
attribute:: can be abbreviated to @
// is short for /descendant-or-self::node()/
A location step of . is short for self::node()
ex: .//para is short for
self::node()/descendant-or-self::node()/child::para
Location step of .. is short for parent::node()
LocationPath
38. CORE FUNCTION
LIBRARY
XPath defines a core set of functions and operators
All implementations of XPath must implement the core
function library
Node Set Functions
last()
According to the XPath specification, the last() function is a node-set function
that returns the size for the current (context) node. In reality, this function selects
the last child node of the context node.
Arguments: None
Return Type: Number
Example:
child::para[position()=last()]
String Functions
substring(“12345”, 0, 3) returns “12”
Boolean Functions
boolean true() returns “true”
Number Functions
number sum(node-set) returns the sum of the nodes
Core
Library
39. CONCLUSION
XPath provides a concise and intuitive way to address into XML
documents
Standard part of the XSLT and XPointer specifications
Implementing XPath basically requires learning the abbreviated
syntax of location path expressions and the functions of the core
library
Conclusion
Because Xpaht is cooperation between XSL and Xpointer working groups it has a broader definition so that both groups can use it. Different implementations specific to each language are defined within that language so that Xpath can be used across several languages.
Xpath is used because we needed a way to point to a specific thing or a set of things in an XML doc.
Namespace portion if the name of a node is optional, NULL if not specified
Children of DOC are a processing-instruciton node and two para element nodes
Four nodes comprise the descendents of the 1st <para> node: 2 text nodes, and <em>node >>Children
<em> has child text node >> Grandchild of <para>
?Pub Caret?: Pub Caret is the xml declaration and contains special info for the xml processor.
Tree order is top to bottom and left to right. Is possible to count nodes and select them by ordinal position w/respect to document order. Ex. Address and select 2nd <para> child of doc.
node (the context node)
pair of non-zero positive integers (context position and context size)
set of variable bindings (mapping from variable names to variable values)
function library (mapping function names to functions) XPath implementations support a core Function Library. XSLT/XPointer extend XPath by defining additional functions
set of namespace declarations (mapping from prefixes to namespace URIs)
(special case of an Expr)
Location Path: describes path from 1pt to another in XML doc
RelativeLocationPath ::= Step | RelativeLocationPath ‘/’ Step
| AbbreviatedRelativeLocationPath
=>The initial sequence of steps selects a set of nodes relative to a context node. Each node in that set is used as a context node for the following step. The set of nodes identified by the composition of the steps is this union.
ex: child::div/child::para
selects the para element children of the div element children of the context node
para element grandchildren that have div parents
AbsoluteLocationPath ::= ‘/’ RelativeLocationPath?
| AbbreviatedAbsoluteLocationPath
AbbreviatedAbsoluteLocationPath
=> / by itself selects the root node of the document containing the context node. If followed by a relative location path, then the location path selects the set of nodes relative to the root node of the document containing the context node.
Node Tests
Every Axis has a principal node type.
Principal node type is the type of the nodes that the axis can contain.
attribute axis (principal node type is attribute)
In relation to CONTEXT NODE
Ancestor, ancestor–or-self //Ancestors of context node…or-self includes context node
Attribute //Specific attribute of the context node
Child //children of the context node
Descsndant, descendant-or-self //descendants of …or-self includes context node
Following //all elements that com after the context node excluding descentants
//elements whose start tags come AFTER the end tag of the context node in doc order
Preceding //elements coming before ContextNode excluding ancestors
Folling-dibling, preceding-sibling //any sibling preceding(before)or following(after) contextnode LtoR order
// in tree structure
Namespace //all open namespaces at context node
Empty if ContextNode is NOT an element
Parent //parent of context node
Self //context node itself