0% found this document useful (0 votes)
4 views

Nodename

Uploaded by

kngb145
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Nodename

Uploaded by

kngb145
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Expression Description

Nodename Selects all nodes with the name


"nodename"
/ Selects from the root node
// Selects nodes in the document from
the current node that match the
selection no matter where they are
. Selects the current node
.. Selects the parent of the current node
@ Selects attributes

 / is the root of the current drive;


 ./ is the current directory;
 ../ is the parent of the current directory.

 XSLT:
o XSL (eXtensible Stylesheet Language) is a styling language for XML.
o XSLT stands for XSL Transformations.
o XSLT transforms an XML document into another XML document
o XSLT uses XPath to navigate in XML documents
 XML Validator:
o It is used to validate the input message by checking the syntax of XML.
o XML documents must have a root element
o XML elements must have a closing tag
o XML tags are case sensitive
o XML elements must be properly nested
o XML attribute values must be quoted

 XSLT Introduction:
o XSL (eXtensible Stylesheet Language) is a styling language for XML.
o XSLT stands for XSL Transformations.
o XSLT is used to trans form XML Documents into XHTML or into other XML
Documents
o The XSLT stylesheet is written in XML format. It is used to define the
transformation rules to be applied on the target XML document.
o The XSLT processor takes the XSLT stylesheet and applies the transformation
rules on the target XML document and then it generates a formatted document in
the form of XML, HTML, or text format. At the end it is used by XSLT formatter
to generate the actual output and displayed on the end-user.

 XSLT import:
o The XSLT <xsl:import> element is used to import the content of one stylesheet to
another stylesheet. The importing stylesheet has higher precedence over imported
stylesheet.
o <xsl:import href = "uri">
</xsl:import>
o href: It is used to provide the path of xslt stylesheet to be imported.
 XSLT Transform:
o The root element that declares the document to be an XSL style sheet is
<xsl:stylesheet> or <xsl:transform>
o <xsl:stylesheet> and <xsl:transform> are completely synonymous and either can
be used!

 Templete in XSLT:
o An XSL style sheet consists of one or more set of rules that are called
templates.
o A template contains rules to apply when a specified node is matched.
 XSLT For-each:
o The <xsl:for-each> element allows you to do looping in XSLT.
o The XSL <xsl:for-each> element can be used to select every XML element
of a specified node-set.
o The value of the select attribute is an XPath expression. An XPath
expression works like navigating a file system; where a forward slash (/)
selects subdirectories.
o We can also filter the output from the XML file by adding a criterion to the
select attribute in the <xsl:for-each> element.
o Legal filter operators are:
 = (equal)
 !=(not equal)
 &lt; less than
 &gt; greater than
 XSLT SORT:
o The <xsl:sort> element is used to sort the output.

You might also like