Wednesday, February 18, 2026

Composite Sensors

composite sensors:

Implementing composite sensors within a SOA solution provides the ability to define trackable fields on messages and enables you to find a specific composite instance by searching for a field or fields within a message. 

-> Composite sensors provide a method for implementing traceable fields on messages. Composite sensors enable you to perform the following tasks:

    Monitor incoming and outgoing messages.

    Specify composite sensor details in the search utility of the Instances page of a SOA composite application in Oracle Enterprise Manager Fusion Middle-ware Control. This action enables you to locate a particular instance.

    Publish JMS data computed from incoming and outgoing messages.

    Track composite instances initiated through business event subscriptions.

-> It basically means marking a variable or data field to be traced at runtime. So at runtime you can see the values of this field or variable for a running instance, but also you can search for running instances (e.g. find the running instance of which the field ‘order id’ has value ‘AB12345’).

Handle Fault in Synch process

Scenario: 

If a fault occurs then we need to store the fault message in DB also sent the same fault to the consumer for Sync Process.

->

In BPEL whenever we call the external services and that services are not available then we get remote/binding fault.

In our scenario we are calling DB to store data suppose DB is down then in that case we can handle the error by using catch/catchAll/throw activity.

Note: 

Throw

The throw activity provides one way to handle errors in a BPEL process by generating a fault.

throw activity in a BPEL process can throw any type of fault, including standard faults,

A fault thrown by a throw activity should be caught and handled in the BPEL process.

The throw activity has three elements: its name, the name of the fault, and the fault variable

Catch

defines a set of custom fault-handling activities that execute based on an optional fault name and/or fault variable. If the fault name is missing, then the catch intercepts all faults with the same type of fault data.

CatchAll

CatchAll fault handler that executes if a thrown fault is not caught by a  catch block.

 Catch all is a variant of catch. It does not specify a fault name or variable to catch.

Step 1: For custome error create catch block in your block, once u define define any system error like binding/remote fault also create variable faultVar. 

-> This variable will create runtime.wsdl 

Runtime Faults
<message name="RuntimeFaultMessage">
<part name="code" type="xsd:string"/> 
<part name="summary" type="xsd:string"/> 
<part name="detail" type="xsd:string"/> 
</message>

Step 2:
In assign activity assign code/detail/smmary value

Step3:
In same scope throw system errror.

step4: we can aso define same thing in catchAll block

XSLT Variables

 

Variables in XSLT

<xsl:variable> element is used to declare variables in XSLT. 

After declaring a variable, you can assign the required values to it. To access the value stored in a variable, prefix the variable name with the $ character.

Creating Variables

Variables in XSLT are categorized as local and global variables. 

Global variables are created using the <xsl:variable> element 

Local variables are declared within the body of a particular template, within the <xsl:template> element. These variables can be accessed only within the template in which they were declared.

syntax for the <xsl:variable> element is

<xsl:variable name = Qname select =Expression as = sequence-type > template body </xsl:variable>

  • name: Represents the name of a variable, and is a qualified name such as the XML name. The qualified name can have the name of the namespace as a prefix.

  • select: Holds the value of a variable or an expression. This is an optional attribute. 

  • For example, the following is the syntax to assign the value returned to a variable:

<xsl:variable name="CameraName" select=" 'XYZ' "/>

In the above syntax, a variable, CameraName, is declared, and the value, XYZ, is assigned to the variable.

Example

Camera.xml File
<?xml version="1.0"?> <Camera> <CameraName>XYZ</CameraName> <Price type=USD>75</Price> </Camera>
Camera.xsl Stylesheet
the code of an XSLT file that uses variables to retrieve and display information from the Camera.xml file

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="Camera"> <xsl:variable name="cname" select="CameraName"/> <xsl:variable name="cprice" select="Price"/> </xsl:template> </xsl:stylesheet>

the CameraName and Price information of the Camera.xml file are selected and assigned to the variables, cname and cprice, respectively. The select attribute is used to assign the values.

The select attribute is optional, and if not present, the value of the variable is the data within the <xsl:variable> element.

<xsl:variable name="BookName"> Science </xsl:variable>

syntax to declare a variable of the integer datatype

<xsl:variable name="Marks" as="xs:integer*" select="90"/>

In the above syntax, a variable, Marks, of the integer datatype is declared, and the value, 90, is assigned to it.

Accessing Variables

To access the value stored in a variable, use the $ character.
$Marks

Note

In XSLT, you cannot change the value of the variable dynamically.

Cameras.xml File
<?xml version="1.0"?> <CameraInformation> <Camera> <CameraName>XYZ</CameraName> <Price type="USD">75</Price> </Camera> <Camera> <CameraName>PQR</CameraName> <Price type="USD">80</Price> </Camera> <Camera> <CameraName>HIJ</CameraName> <Price type="USD">85</Price> </Camera> </CameraInformation>
 Cameras.xsl File
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <CAMInformation> <xsl:apply-templates/> </CAMInformation> </xsl:template> <xsl:template match="Camera"> <xsl:variable name="cname" select="CameraName"/> <xsl:variable name="cprice" select="Price"/> <xsl:value-of select="$cname"/> <xsl:value-of select="$cprice"/> </xsl:template> </xsl:stylesheet>

two variables, cname and cprice, are created and the values of CameraName and Price are stored in these variables. To display these values in the resultant document, use the $ character. 


XSLT Datatypes

 The following are the different datatypes:

  • Boolean

  • Number

  • String

  • Node-set

Boolean Datatype

The Boolean datatype returns true or 
false. 
Functions in XPath, such as true(), false(), and lang(), return values of the Boolean datatype. 

Ex: you can declare a function that checks whether or not a particular node exists in the document. This function returns true if the node exists and returns false if the node does not exist.

Number Datatype

The number datatype represents numeric values in XPath.
The number datatype can store up to 64-bit floating-point numbers.
XPath does not support scientific notation of floating point values. As a result, you cannot perform relational operations such as greater than, greater than or equal to, lesser than, and lesser than or equal to, on variables of the number datatype. 

Functions of XPath, such as sum(), round(), ceil(), floor(), number(), and format-number(), are examples of functions that return values of the number datatype.

String Datatype

A string is a collection of characters that are enclosed in single or double quotes.    

XPath provides several functions to perform string related operations. 
For example, the translate() function converts upper case characters to lower case, and vice-versa. 
The string-length() function enables you to retrieve the number of characters in a string. 
the string-length() function to find the length of a string

The Strlen.xsl File


<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> The string length of "California" is <xsl:value-of select= "string-length('California')"/> </xsl:template> </xsl:transform>

the string-length() function is used to count the number of characters in the word, California.

Node-Set

A node-set is a group of nodes in a source tree. The nodes in the node-set can be from more than one source tree. The node-set can also contain nodes from a temporary tree or from a tree, which is imported to the current document through an external function.

Operators

Operators are symbols to represent operations, and are used with operands to form an expression. The syntax to use an Operator in XSLT is:

OperatorName | MultiplyOperator | <</>> | <<//>> | <<+>> |<<|>>| <<->> | <<=>> | <<!=>> | << < >> | << > >> | << <= >> | << >= >>


 Expression.xsl File


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:variable name="p" select="1000"/> <xsl:variable name="n" select="3"/> <xsl:variable name="r" select="1.5"/> <xsl:variable name="h" select="100"/> <xsl:variable name="mul" select="($p*$n*$r) div $h"/> The value of the expression is <xsl:value-of select="$mul"/> </xsl:template> </xsl:stylesheet>

the operators, * and div, are applied to the value stored in the variables, p, n, r, and h, and the resultant value is stored in the variable, mul.

XPath Expressions

You can use XPath expressions to define the location of a particular element in an XML document during the XSLT transformation process.

Elements.xsl File

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet>

the match="/" criteria locates the document root.
The select="." expression specifies that the XSL file

XSLT choose,when,otherwise

 The <xsl:choose>, <xsl:when>, and <xsl:otherwise> elements of XSLT process elements in a document depending on the success or failure of a condition. This method of processing documents is known as conditional processing.

The <xsl:choose> Element

The <xsl:choose> element uses a condition to select an option from an available set of options. 
You can select and display nodes in the resultant document or result tree depending on the option selected.

 You can use the <xsl:when> element to provide the options within the <xsl:choose> element.

The <xsl:choose> element is similar to the if-then-else statement. 

You can use this element only if at least one <xsl:when> element is declared within a block and an equivalent <xsl:otherwise> element is specified.

The syntax for the <xsl:choose> element is:

<xsl:choose> <xsl:when>+ <xsl:otherwise> ? </xsl:choose>

Note

Multiple <xsl:when> conditions can be used to process conditions in a similar manner as a switch-case statement.

<xsl:when> Element

The <xsl:when> element is a conditional testing element that enables you to test conditions. This element always appears within the <xsl:choose> element. 

All <xsl:choose> elements contain at least one <xsl:when> element.

 The syntax for the <xsl:when> element is:

<xsl:when test = Expression> template body </xsl:when>

the test attribute within the <xsl:when> element tests the condition specified through the expression.

This attribute returns a Boolean value depending on the specified expression.

 If the condition returns true, the <xsl:when> element processes all instructions within the template body. The <xsl:otherwise> element specifies the elements to be processed if the <xsl:when> element returns false.

Ex: XML document called TVProgram that stores information about television programs:

 TVProgram.xml File


<?xml version="1.0"?> <Television> <TVName>Sports TV</TVName> <Channel ch="3"> <Progname>Football</Progname> <Time>8.30 AM</Time> <Description>Argentina Vs France</Description> </Channel> <Channel ch="4"> <Progname>Basketball</Progname> <Time>22.30 PM</Time> <Description>India Vs Australia</Description> </Channel> </Television>

the TVProgram.xml file stores information about Channel 3 and Channel 4 programs identified by the ch attribute of the <channel> element.

how the <xsl:choose> and <xsl:when > elements extract Channel 3 information from the TVProgram.xml file:

Channel.xsl Stylesheet


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" indent="yes"/> <xsl:template match="/"> <TV> <xsl:apply-templates/> </TV> </xsl:template> <xsl:template match="Channel"> <xsl:choose> <xsl:when test="@ch=1"> <xsl:copy-of select="."/> </xsl:when> <xsl:when test="@ch=3"> <xsl:copy-of select="."/> </xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet>


It uses two <xsl:when> elements to check the values for the ch attribute. In the first <xsl:when> element, the condition is specified as ch =1. In the source TVProgram.xml file, there are no values with a ch attribute 1. As a result, the first <xsl:when> element returns false. In the second <xsl:when> element, the condition is specified as ch=3. When this condition is satisfied, all corresponding nodes are copied to the resultant document.

The <xsl:otherwise> Element

The <xsl:otherwise> element always appears within the <xsl:when> element.
If the conditions specified in the <xsl:when> element return false, the elements within the <xsl:otherwise> element are processed.

syntax for the <xsl:otherwise> element is:

<xsl:otherwise> template body </xsl:otherwise>

Note

The <xsl:otherwise> element does not contain any attributes


Ex:

 Product.xml File

<?xml version="1.0"?> <SYSTEM> <PRODUCT type="PROCESSOR"> <NAME>ABC Processor</NAME> <SPEED>500 Mhz</SPEED> <PRICE>14250</PRICE> </PRODUCT> <PRODUCT type="PROCESSOR"> <NAME>XYZ Processor</NAME> <SPEED>450 Mhz</SPEED> <PRICE>11500</PRICE> </PRODUCT> <PRODUCT type="PROCESSOR"> <NAME>PQR Processor</NAME> <SPEED>330 Mhz</SPEED> <PRICE>9850</PRICE> </PRODUCT> <PRODUCT type="HARD-DISK"> <SIZE>80 GB</SIZE> <PRICE>6000</PRICE> </PRODUCT> <PRODUCT type="HARD-DISK"> <SIZE>40 GB</SIZE> <PRICE>4800</PRICE> </PRODUCT> <PRODUCT type="HARD-DISK"> <SIZE>20 GB</SIZE> <PRICE>3500</PRICE> </PRODUCT> </SYSTEM>

the Product.xml file stores information about various products, such as processors and hard disks. 

The stylesheet that compares the value passed to the prodtype parameter and the value of the type attribute of the <Product> element in the Product.xml file:

PassValue.xsl Stylesheet


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:param name="prodtype"/> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:choose> <xsl:when test="$prodtype='PROCESSOR'"> <PRODUCT-LIST> <xsl:for-each select="//PRODUCT"> <xsl:if test="@type=$prodtype"> <xsl:copy-of select="."/> </xsl:if> </xsl:for-each> </PRODUCT-LIST> </xsl:when> <xsl:when test="$prodtype='HARD-DISK'"> <PRODUCT-LIST> <xsl:for-each select="//PRODUCT"> <xsl:if test="@type=$prodtype"> <xsl:copy-of select="."/> </xsl:if> </xsl:for-each> </PRODUCT-LIST> </xsl:when> <xsl:otherwise> <html> <body> <center><table border="1"> <tr><Td><xsl:value-of select="$prodtype"/> does not exist in the Source Document</Td></tr> </table></center> </body> </html> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>

he PassValue.xsl stylesheet displays the information about the products in the resultant document. 

When you specify a value that does not exist in the XML document, the stylesheet executes the statements within the <xsl:otherwise> element, and displays the message stating that the product is not available.









XSLT: for-each Element

 

<xsl:for-each> Element

looping constraints or iterations using the <xsl:for-each> element. 
This element selects nodes as node-set using the XPath Expression

The syntax for the <xsl:for-each> element is:

<xsl:for-each select =Expression> <xsl:sort> * template body </xsl:for-each>

the select attribute contains the expression that checks whether or not the node-set exists in the source document. 
 If the node-set exists, the <xsl:for-each> element selects all corresponding nodes to be displayed in the resultant document or tree.

You can specify the template body or the <xsl:sort> element within the <xsl:for-each> element.

The <xsl:sort> element helps sort numbers, strings, or node-sets.

XSLT copy and copy-of


 

Copying Elements from the Source Document to the Resultant Document

 <xsl:copy> and <xsl:copy-of> elements enable you to copy information from the source document to the resultant document. 

You can also use the <xsl:value-of> element to copy specific values in an XML element from a source document to a resultant document.

 <xsl:copy> Element

<xsl:copy> element copies a specific node from the source document to a resultant document.
This element copies only the current node and its namespace to the resultant document. 
The <xsl:copy> element does not copy child nodes, descendants, or attribute nodes of the current node. This method of copying is called shallow copying.

syntax for the <xsl:copy> element is:

<xsl:copy copy-namespaces = "yes" | "no" use-attribute-sets = qnames validation = "strict" | "lax" | "preserve" | "strip" type = qname> <!-- Content: sequence-constructor --> </xsl:copy>

In the above syntax:
  • copy-namespaces: Copies the namespace of the element in the source document to the resultant document. If the value of this attribute is yes, the namespace is copied to the resultant document. If this attribute has the value no, the namespace is not copied into the resultant document. The default value is yes.

  • use-attribute-sets: Copies attribute-sets while copying the element node to a resultant document. The qnames in the syntax are names of attribute-sets separated by spaces.

  • type, validation: Control the type annotation applied to individual elements and attribute nodes when a new node is created in the resultant document. The validation attribute has the following values:

  • strip: Indicates the type annotation, xs:anyType, if the new node created is an element node. Indicates the type annotation, xdt:unTypedAtomic, if the new node created is an attribute node. This attribute does not validate against the schema definition for the type annotation in the element and the attribute node.

  • preserve: Enables the newly constructed node in the resultant document to retain the type annotation as specified in the source document. The preserve value behaves differently depending on the type of the node created in the result document. For example, if the new node is an element node, the type annotation of the newly created node is xs:anyType. The nodes within the element retain the type annotation as specified in the source document. If the new node is an attribute node, the copied attribute retains the type annotation specified in the source document.

  • strict: Applies the type annotation to newly created nodes by validating the element or attribute nodes with the relevant schema definition declared in the source document. If the element or attribute node is not valid, transformation fails.

  • lax: Applies the type annotation to newly created nodes by validating the element or attribute nodes with the relevant schema definition declared in the source document. If the element or attribute is not valid, the type annotation for an element node is xs:anyType and for an attribute node is xdt:untypedAtomic. 

  • Note

    You need to specify the value of the version parameter as 2.0 because the copy-namespaces attribute is supported only in XSLT 2.0.

Functions of the <xsl:copy> Element with Nodes

Types of Nodes

Function of the <xsl:copy> Element

Root node

Creates an empty resultant document if the current node of the source document is the root node. The use-attribute-sets attribute of the <xsl:copy> element is ignored.

Element node

Copies the element and the namespace of the corresponding element to the resultant document. This element does not copy child or descendant nodes. The use-attribute-sets attribute contains the list of attribute names added as the attribute of the new element node.

Text node

Copies the content of the <xsl:text> element to the resultant document as displayed in the source document. The use-attribute-sets attribute of <xsl:copy> is ignored.

Attribute node

Adds an attribute to the resultant document with the same name as that of the source document. If the <xsl:copy> element does not find an open element node, an error occurs. The use-attribute-sets attribute of the <xsl:copy> element is ignored.

Processing Instruction node

Copies the node name and its value from the source document to the resultant document.

Comment node

Copies the content of the comment node and the node name from the source document to the resultant document.

Namespace node

Copies the namespace from the source document to the resultant document. To copy the namespace, the <xsl:copy> element needs to find an open element node.


 <xsl:copy-of> Element

The <xsl:copy-of> element copies all nodes of the node-set in the source document to the resultant document. 
While copying, the descendant and child nodes are also copied to the resultant document. This method of copying is known as deep copying.

The syntax for the <xsl:copy-of> element is:

<xsl:copy-of select = expression copy-namespaces = "yes" | "no" validation = "strict" | "lax" | "preserve" | "strip" type = qname />

In the above syntax:

  • select: Retrieves all nodes of the node-set and copies the nodes into the resultant document if the value of the expression is a node-set.

  • copy-namespaces: Copies the namespace to the resultant document if the copy-namespace attribute is set to yes. If you specify the value of this attribute as no, the namespace is not copied. Only XSLT 2.0 or later versions support this attribute.

  • validation: Is similar to the validation attribute of the <xsl:copy> element for all values, except the preserve value.

  • type: Enables a similar type annotation as that of the source document in the resultant document.

 



XSLT Value-of

 

<xsl:value-of> Element

The <xsl:value-of> element specifies the value of an XML element to be copied to the resultant document. 

The syntax for the <xsl:value-of> element is:

<xsl:value-of select =Expression separator = { String } disable-output-escaping ="yes | no"/>

In the above syntax:

  • select: Retrieves the result of the expression and displays it in the resultant document. While displaying the output of the expression, the value is converted to a string format. Table 4-2 lists the action of the <xsl:value-of> element based on the value of the expression in the select attribute:

Value of the Expression in the Select Attribute

Action of the <xsl:value-of> Element

Boolean value

Converts the Boolean value to a string value, such as true or false.

Node-set

Provides the value as output to the resultant document depending on the type of nodes in node-set.

Numeric value

Converts the numeric value to the string format using the <xsl:number> element or the format-number() function.



  • separator: Refers to a separator character for the values in the select attributes. The value specified in the separator concatenates the values specified in the select attribute. For example, in the following code, the asterisk character is the separator that concatenates the values a, b, c, and d of the select attribute: 

  • <customer><xsl:value-of select ="(a, b, c, d)" separator ="*"/><customer/>

The output of the above code is:

<customer>a*b*c*d</customer>
  • disable-output-escaping: Contains the value, yes or no. If the value is no, special characters such as < and > are specified as &lt, and &gt, respectively. This is the default value. If the value of the disable-output-escaping is yes, the attribute enables you to use characters, such as < and >.

  • You can use the <xsl:value-of> element in the following formats:

    • <xsl:value-of select ="//@currency"/>: Displays the value of the attribute currency in the resultant document.

    • <xsl:value-of select ="child::*"/>: Copies all the child nodes of the current node into the resultant document.

    • <xsl:value-of select ="sum(//balance)"/>: Specifies XPath functions, such as floor(), sum(), concat(), and translate() to display the sum of a node called balance.

XSLT Xpath Functions

 

XPath Functions

XPath functions are referred by the namespace URI http://www.w3.org/2003/05/xpath-functions.

The XPath functions enable you to handle numeric values, string values, Boolean values, node-sets, and nodes. 

the XPath functions also work with XPath expressions.

boolean()

The boolean() function converts any value into a boolean value. The syntax for this function is:

boolean boolean(value)

ceiling()

The ceiling function returns the nearest small integer for the given value. The syntax for this function is:

Number ceiling(value)The result will be greater than or equal to the value of the given argument.

concat()

The concat function combines multiple strings into one string. The syntax for this function is:

String concat(value1, value2+)

contains()

This function checks whether a specific substring exists in a given string and returns a boolean value depending on a test value. The syntax for this function is:

boolean contains(value, substring)

If the string contains the substring, the function returns true or returns false when the substring is not found. If the arguments that you pass are not of string data type, the function converts them into string data type.

count()

The count() function returns the number of nodes in a node-set. The syntax for this function is:

number count(nodes)The function does not count the child nodes in the given node-set.

current()

The current() function returns the node that contains single node. The return data type of this function is a node-set. The syntax for the current() function is:

node-set current()

When you process the <xsl:apply-templates> and <xsl:for-each> elements, the selected nodes become the current node.

current-group()

The current-group() function returns a group of related items. This function requires no arguments. The syntax for the current-group() function is:

current-group() as item()*

 The <xsl:for-each-group> element processes a group of related items during iteration process. The group of items processed currently by this element is called the current group.

current-grouping-key()

The current-grouping-key() function returns the current-grouping-key that is used by the <xsl:for-each-group> element. The syntax for this function is:

current-grouping-key() as xdt:anyAtomicType

document()

The document() function loads the XML document and identifies the root node in the source document. The syntax for this function is:

number document(uri) number document(uri, base-uri)

element-available()

The element-available() function checks whether an XSLT element is available or not. The syntax for this function is:

boolean element-available(name)

The element-available() function returns a boolean value depending on the availability of the element The argument that you pass must be of string data type, if not, the function converts the argument into a string.

false()

The false() function returns the value false and is used as a boolean constant in XPath expressions. The syntax for this function is:

boolean false()

floor()

The floor() function returns the nearest great integer for the given number. The syntax for this function is:

number floor(value)

The argument to the floor() function should be a numeric value. If the argument is not numeric, the function converts it into a numeric value.

format-number()

The format-number() function formats a given number by applying a pattern to it. The syntax for this function is:

string format-number(value, format) number format-number(value, format, name)

The function converts numbers to string values. This function is used when the number to be displayed in the resultant document needs to occupy a fixed number of character positions. The <xsl:decimal-format> element defines the characters and symbols required for the format-number function.

format-dateTime()

The format-dateTime() function formats the specified date and time. The syntaxes for this function are:

format-dateTime($value as xs:dateTime?,$picture as xs:string, $date-format-name as xs:string) as xs:string? format-dateTime($value as xs:dateTime?,$picture as xs:string) as xs:string?

The name of the <xsl:data-format> element is passed as the argument to this function.

format-date()

The format-date() function formats the given date specific to a picture string that is passed as an argument. The syntaxes for this function are:

format-date ($value as xs:dateTime?,$picture as xs:string, $date-format-name as xs:string) as xs:string? format-date ($value as xs:dateTime?,$picture as xs:string) as xs:string?

The name of the <xsl:data-format> element is passed as the argument to the function.

format-Time()

The format-Time() function formats the given time specific to the picture string that is passed as the argument. The syntaxes for this function are:

format-Time($value as xs:dateTime?,$picture as xs:string, $date-format-name as xs:string) as xs:string? format-Time($value as xs:dateTime?,$picture as xs:string) as xs:string?

The name of the <xsl:data-format> element is passed as the argument to the function.

function-available()

The function-available() function checks whether the given function is available or not. The syntax for this function is:

boolean function-available(name)

The function that you pass as an argument can be either an XPath function or an extension function.

generate-id()

The generate-id() function returns a unique string value for every node in the document to enable identify the node. The syntax for this function is:

string generate-id()

string generate-id(node)

The generated id for each node differs from processor to processor.

Id()

This function identifies the attribute declared of the type ID in a DTD or schema. The Id() function returns the node or node-set that contains the attribute. The syntax for this function is:

node-set id(value)

key()

The key() function is used with the <xsl:key> element. This function finds the nodes in an XML document using the name of the <xsl:key> element as one of the arguments. The syntax for the key() function is:

node-set key(name,value)

lang()

The lang() function checks whether the language passed as a argument to this function is equal to language of the context node defined by the xml:lang attribute. The syntax for this function is:

boolean lang(language)

last()

The last() function returns the number assigned to the last node in the document. The syntax of this function is:

number last()

When you are processing a list of nodes, the nodes are numbered from the context node. Using the last() function, which numbers the last node, you can determine the context size. You can use this function along with <xsl:apply-template> and <xsl:for-each> elements to find the number of nodes selected.

local-name()

The local-name() function retrieves a node name from the source document. The syntax for this function is:

string local-name() string local-name(node)

If the name of the node contains prefix, this function returns a qualified name without the prefix.

name()

The name() function returns the name of the given node. The syntax of this function is:

string name() string name(node)

If the node is declared using the namespace, this function returns a <prefix-name:element-name> element.

namespace-uri()

The namespace-uri() function returns the namespace URI of the given node in the source document. The syntax for this function is:

string namespace-uri() string namespace-uri(node)

normalize-space()

The normalize-space() function eliminates the white spaces in the prefix and suffix of the given string. The syntax for this function is:

string normalize-space() string normalize-space(value)

not()

If the argument of this function is true(), it returns false and vice versa. The syntax for this function is:

boolean not(condition)

number()

The number() function converts the give value into a numeric value. The syntax for this function is:

number number() number number(value)

position()

The position() function finds the position of a node in a document. The syntax for this function is:

number position()

This function returns the number assigned to the node. If this function is used with the <xsl:apply-templates>,<xsl:key>, and <xsl:for-each> elements, it displays the position of the node after sorting.

replace()

The replace() function replaces the substring2 with the substring1 in the given string. The syntax for this function is:

replace(value, substring1, substring2)

round()

The round() function rounds the given decimal value to the nearest integer. The syntax for this function is:

number round(value)

sort()

The sort() function sorts the elements using the name specified in <xsl:sort-key> element as one of its arguments. The syntax of this function is:

sort($input-sequence as item()*, $sort-spec-name as xs:string) as item()*

The argument $input-sequence as item()* denotes the initial sequence for sorting. The $sort-spec-name as xs:string argument is the value defined in the <xsl:sort-key> element.

starts-with()

The starts-with() function checks whether a string starts with a particular substring or not and returns true or false accordingly. The syntax for this function is:

boolean starts-with(value, substring)

string()

The string() function converts the given value into a string value. The syntax for this function is:

string string() string string(value)

string-length()

The string-length() function finds the length of the given string. The syntax for this function is:

number string-length() number string-length(value)

substring()

The substring() function returns all characters in a given string value starting from the position specified by the start argument. The syntax for this function is:

string substring(value, start) string substring(value, start, length)

You can use the length argument to return a substring that contains characters between the start position and the position specified by the length argument.

substring-after()

The substring-after() function returns a substring present after the occurrence of the given substring in a string. The syntax for this function is:

string substring-after(value, substring)

substring-before()

The substring-before() function returns a substring present before the occurrence of the given substring in a string. The syntax for this function is:

string substring-before(value, substring)

system-property()

The system-property() function identifies the value of system properties, such as xsl:version, xsl:vendor, and xsl:vendor-url, and returns the values. The syntax for this function is:

system-property(name)

translate()

The translate() function replaces a specified number of characters with another set of characters in a given string. The syntax for this function is:

string translate(value, from, to)

true()

The true() function is used in XPath expressions as a boolean constant. The syntax for this function is:

boolean true()

unparsed-entity-uri()

The unparsed-entity-uri() function retrieves the unparsed entities declared in the DTD of a source document. The syntax for this function is:

string unparsed-entity-uri(name)

You need to pass the name of an unparsed entity in the DTD as an argument to this function. The function returns the corresponding URI as a string value.

unparsed-text()

The unparsed-text() function reads the content in the external file and returns the content as a string to the source file. The syntax for this function is:

unparsed-text($href as string?) as string

The argument href contains the URI of the external file in a string format. If the file contains characters, such as < and &, these characters are returned by the function as &lt and &amp.

XSLT ERROR

 


When transforming documents in XSLT, various errors, such as incorrect syntax, type errors, and escaping of white spaces, may occur. White spaces in the XML document cause errors while parsing the document.

You can classify errors occurring during transformation as:

  •  Static: Occurs due to missing or incorrect syntax or incorrect structuring of stylesheet elements. You need to inform the end user about static errors before transforming the document, because these errors cannot be rectified during run time.

  • Dynamic: Occurs during run time. The XSLT processor either terminates the process or continues processing the document by taking actions to recover from the error. The action taken can either rectify the error or ignore the error and continue transforming the document.

  • Type: Occurs if there is any mismatch in the data type, because of which the processor does not receive data in the required format. For example, using a string in the place of a numeric value leads to a type error. Type errors can be static or dynamic.

  • Serialization: Occurs when serializing the result tree to the output format. For example, if the specified encoding value cannot be used to serialize the result tree in the required output format, a serialization error occurs.

The <xsl:message> element reports the errors that occur during transformation.

<xsl:message terminate = { "yes" | "no" }> <!-- Content: sequence-constructor --> </xsl:message>


XSLT Elements

 

XSLT Elements

XSLT elements are the building blocks for the transformation that occurs in your XSL file. These elements define the pattern in which the XML elements of the source documents are transformed.



<xsl:apply-imports>

The <xsl:apply-imports> element applies a template rule from an imported style sheet. This element is used within the <xsl:template> element. The <xsl:apply-imports> element contains either a null value or the <xsl:with-param> element. The syntax for this element is:

<xsl:apply-imports> <!-- Content: xsl:with-param* --> </xsl:apply-imports>

<xsl:apply-templates>

The <xsl:apply-templates> element selects a set of nodes from the source document on whom the template is applied, depending on the rule specified for each node in the template element. The syntax for this element is:

<xsl:apply-templates select="expression" mode="name"> <!-- Content: (xsl:sort | xsl:with-param)* --> </xsl:apply-templates>

In the above syntax, the attributes select and mode are optional. The select attribute specifies a node-set for processing whereas the mode attribute defines the processing pattern when multiple processing ways are specifies for a node-set.

<xsl:analyze-string>

The <xsl:analyse-string> element analyzes the string passed to the select attribute with a substring that matches a regular expression specified by the regex attribute. The syntax for this element is:

<xsl:analyze-string Attribute-list> <!-- Content: (xsl:matching-substring?, xsl:non-matching-substring?, xsl:fallback*) --> </xsl:analyze-string>

In the above syntax, the Attribute-list consists of the select and regex attributes. In a given string, if the <xsl:analyze-string> element finds the substring that matches the expression. These substrings are processed by the <xsl:matching-substring> element whereas the substrings that do not match are processed by the statements in the <xsl:non-matching-substring> element.

<xsl:attribute>

The <xsl:attribute> element generates attributes in the resultant document for elements of the source document. The syntax for this element is:

<xsl:attribute Attribute-list> <!-- Content: sequence-constructor --> </xsl:attribute>

In the above syntax, the Attribute-list consists of the following attributes:

  • name = { qname }

  • namespace = { uri-reference }

  • validation = "strict" | "lax" | "preserve" | "strip"

  • type = qname

  • disable-output-escaping = "yes" | "no"

The <xsl:attribute> element also controls the type of the attributes in the document.

<xsl:attribute-set>

The <xsl:attribute-set> is used to generate a set of attributes for the elements in the resultant document. The syntax is:

<xsl:attribute-set Attribute-list <!-- Content: xsl:attribute* --> </xsl:attribute-set>

In the above syntax, the Attribute-list contains the attributes:

  • xsl:call-template name = templatename

  • name = qname

  • use-attribute-sets = qnames

You can apply an attribute-set to multiple elements in a tree. In addition, you can include more than one attribute-set within a single <xsl:attribute-set> element, using the use-attribute-sets attribute.

<xsl:call-template>

If a template is defined by the name attribute within a document, you can access or invoke this template using the <xsl:call-template> element. This element accepts the template name as the attribute. The syntax for this element is:

<xsl:call-template name="templatename"> <!-- Content: xsl:with-param* --> </xsl:call-template>

<xsl:character-map>

The <xsl:character-map> element replaces a set of characters appearing in the text or attribute nodes of the source document with a given set of values when generating the output. The syntax for this element is:

<xsl:character-map Attribute-list> <!-- Content: (xsl:output-character*) --> </xsl:character-map>

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • use-character-maps = qnames

<xsl:choose>

The <xsl:choose> element selects an option from a set of available options, depending on the evaluation of the condition provided with the element. The syntax for this element is:

<xsl:choose> <!-- Content: (xsl:when+, xsl:otherwise?) --> </xsl:choose>

The options are specified within the <xsl:choose> element using the <xsl:when> element. Depending on the option selected, the nodes in the source tree are selected and displayed in the resultant document.

<xsl:comment>

This element creates a comment node in the resultant document. The syntax for this element is:

<xsl:comment> <!-- Content: sequence-constructor --> </xsl:comment>

<xsl:copy>

The <xsl:copy> element copies nodes in the source document to the resultant document. The syntax for this element is:

<xsl:copy Attribute-list> <!-- Content: sequence-constructor --> </xsl:copy>

In the above syntax, the Attribute-list contains the attributes:

  • copy-namespaces = "yes" | "no"

  • use-attribute-sets = qnames

  • validation = "strict" | "lax" | "preserve" | "strip"

  • type = qname

This element does copies only the current node, and not the descendant nodes. This type of copy is called a shallow copy.


<xsl:copy-of>

The <xsl:copy-of> element copies all the descendant nodes and namespaces from the current node to the resultant document. The syntax for this element is:

<xsl:copy-of Attribute-list />

In the above syntax, the Attribute-list contains the attributes:

  • select = expression

  • copy-namespaces = "yes" | "no"

  • validation = "strict" | "lax" | "preserve" | "strip"

  • type = qname


<xsl:date-format>

The <xsl:date-format> element defines the format of a date to be used in the date formatting functions. The syntax for this element is:

<xsl:date-format Attribute-list />

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • language = nmtoken

  • calendar = qname

<xsl:decimal-format>

The <xsl:decimal-format> element represents symbols and characters used in the format-number() function. The syntax for this element is:

<xsl:decimal-format Attribute-list />

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • decimal-separator = char

  • grouping-separator = char

  • infinity = string

  • minus-sign = char

  • NaN = string

  • percent = char

  • per-mille = char

  • zero-digit = char

  • digit = char

  • pattern-separator = char

<xsl:document>

The <xsl:document> element generates multiple output documents during transformation. The syntax for this element is:

<xsl:document Attribute-list> template-body </xsl:document>

In the above syntax, the Attribute-list can contain the attributes:

  • href = { uri }

  • method = { "xml" | "html" | "text" | QName }

  • version = { Nmtoken }

  • encoding = { string }

  • omit-xml-declarations = { "yes" | "no" }

  • standalone = { "yes" | "no" }

  • doctype-public = { string }

  • doctype-system = { string }

  • cdata-section-elements = { list-of-Qnames }

  • indent = { "yes" | "no" }

  • media-type = { string }

The resultant is an XML, an HTML, or a text document.


<xsl:element>

The <xsl:element> element generates an element node in the result tree. The syntax for this element is:

<xsl:element Attribute-list> <!-- Content: sequence-constructor --> </xsl:element>

In the above syntax, the Attribute-list contains the attributes:

  • name = { qname }

  • namespace = { uri-reference }

  • use-attribute-sets = qnames

  • validation = "strict" | "lax" | "preserve" | "strip"

  • type = qname

Using the validation attribute, you can control the type annotation of the element in the document.

<xsl:fallback>

While transforming the source document into resultant document, the XSL processor may not process some elements or functions. To process the elements that are not recognized by the XSL processor, the <xsl:fallback> element contains processing instructions. The syntax for this element is:

<xsl:fallback> <!-- Content: sequence-constructor --> </xsl:fallback>

<xsl:for-each>

The <xsl:for-each> element performs iterative processing of the source document till the condition provided is evaluated as true. The syntax for this element is:

<xsl:for-each Attribute-list> <!-- Content: (xsl:sort*, sequence-constructor) --> </xsl:for-each>

In the above syntax, the Attribute-list contains the select attribute. This attribute holds a sequence-expression. This element repeatedly processes the contents of the element until the expression specified in the select attribute is met.

<xsl:for-each-group>

The <xsl:for-each-group> element repeatedly processes the sequence constructor for each group of items. The syntax for this element is:

<xsl:for-each-group Attribute-list> <!-- Content: (xsl:sort*, sequence-constructor) --> </xsl:for-each-group>

In the above syntax, the Attribute-list contains the attributes:

  • select = expression

  • group-by = expression

  • group-adjacent = expression

  • group-starting-with = pattern

  • group-ending-with = pattern

  • collation = { uri }>

<xsl:function>

The <xsl:function> element defines a function. The syntax for this element is:

<xsl:function Attribute-list> <!-- Content: (xsl:param*, sequence-constructor) --> </xsl:function>

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • as = sequence-type

  • override = "yes" | "no"

If the function already exists with the same name, you need to specify a value yes to the override attribute.

<xsl:if>

The <xsl:if> element checks whether the given expression is true or false. The syntax for this element is:

<xsl:if Attribute-list> <!-- Content: sequence-constructor --> </xsl:if>

In the above syntax, the Attribute-list contains the test attribute that contains the expression to be checked. If the expression returns the Boolean value true, the instructions specified within this element are processed and displayed in the resultant document.

<xsl:import>

The <xsl:import> element combines one or more stylesheet modules to a single stylesheet. The syntax for this element is:

<xsl:import Attribute-list />

In the above syntax, the Attribute-list contains the href attribute that contains the URI of the imported stylesheet.


<xsl:import-schema>

A schema document contains the elements, attributes, and type definitions imported within the <xsl:import-schema> element. The syntax for this element is:

<xsl:import-schema Attribute-list/>

In the above syntax, the Attribute-list contains the attributes:

  • namespace = uri-reference

  • schema-location = uri-reference

<xsl:include>

The <xsl:include> element includes one stylesheet within another stylesheet. The syntax for this element is:

<xsl:include Attribute-list />

In the above syntax, the Attribute-list contains the href attribute that refers to the URI of the stylesheet to be included.

When you use the <xsl:import> element, the importing stylesheet contains higher precedence than the rules and declarations specified in the imported stylesheet. If you use the <xsl:include> element, the included stylesheet is assigned the same precedence as the including stylesheet.

<xsl:key>

The <xsl:key> element declares a key for a particular node in the document. This key is accessed by the key() function. The syntax for this element is:

<xsl:key Attribute-list />

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • match = pattern

  • use = expression

  • as = qname

  • collation = uri

This element simplifies the task of searching for a node within the document. The <xsl:key> element indexes nodes, particularly the namespace nodes.

<xsl:message>

The <xsl:message> element generates a message in the resultant document. The syntax for this element is:

<xsl:message Attribute-list> <!-- Content: sequence-constructor --> </xsl:message>

In the above syntax, the Attribute-list contains the terminate attribute, which has the value, yes, or, no. If the value of the terminate attribute is yes, this element stops processing the stylesheet.

<xsl:namespace>

The <xsl:namespace> element creates a new namespace node in the resultant document. The syntax for this element is:

<xsl:namespace Attribute-list> <!-- Content: sequence-constructor --> </xsl:namespace>

In the above syntax, the Attribute-list contains the name attribute, which is the namespace name.

<xsl:namespace-alias>

The <xsl:namespace-alias> element creates an alternate namespace prefix for the namespace prefix specified in the source document. The alternate namespace prefix appears only in the resultant document. The syntax for this element is:

<xsl:namespace-alias Attribute-list />

In the above syntax, the Attribute-list contains the attributes:

  • stylesheet-prefix = prefix | "#default"

  • result-prefix = prefix | "#default"

<xsl:number>

The <xsl:number> element formats a number and places the formatted value as a string in the text node of the resultant document. The syntax for this element is:

<xsl:number Attribute-list/>

In the above syntax, the Attribute-list contains the attributes:

  • level = "single" | "multiple" | "any"

  • count = pattern

  • from = pattern

  • value = number-expression

  • format = { string }

  • lang = { nmtoken }

  • letter-value = { "alphabetic" | "traditional" }

  • grouping-separator = { char }

  • grouping-size = { number }

This element is used within the template element.


<xsl:next-match>

The <xsl:next-match> element accesses the template rule to override the rules defined by another template in the stylesheet. The syntax for this element is:

<xsl:next-match> <!-- Content: (xsl:with-param | xsl:fallback)* --> </xsl:next-match>

<xsl:otherwise>

The <xsl:otherwise> element is used in conjunction with the <xsl:when> element to process a document depending on the condition. The syntax for this element is:

<xsl:otherwise> <!-- Content: sequence-constructor --> </xsl:otherwise>

If the condition specified in the <xsl:when> element is not met, the instructions within the <xsl:otherwise> element are processed and returned to the <xsl:choose> element.


<xsl:output>

The <xsl:output> element generates various output formats for the resultant document. The syntax for this element is:

<xsl:output Attribute-list />

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • method = "xml" | "html" | "xhtml" | "text" | qname-but-not-ncname

  • cdata-section-elements = qnames

  • doctype-public = string

  • doctype-system = string

  • encoding = string

  • escape-uri-attributes = "yes" | "no"

  • include-content-type = "yes" | "no"

  • indent = "yes" | "no"

  • media-type = string

  • normalize-unicode = "yes" | "no"

  • omit-xml-declaration = "yes" | "no"

  • standalone = "yes" | "no"

  • undeclare-namespaces = "yes" | "no"

  • use-character-maps = qnames

  • version = nmtoken

This element can be used to generate multiple documents of different formats from a single source document.


<xsl:param>

The <xsl:param> elements can be used to create parameters in a stylesheet. When this element is used within the <xsl:stylesheet> or the <xsl:transform> elements, the parameters created are global. If you create the parameters within the template body, the parameters are local. The syntax for this element is:

<xsl:param Attribute-list > <!-- Content: sequence-constructor --> </xsl:param>

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • select = expression

  • as = sequence-type

  • required = "yes" | "no"

<xsl:preserve-space>

The <xsl:preserve-space> element retains the white spaces in the source documents when creating the resultant document. The syntax for this element is:

<xsl:preserve-space Attribute-list />

In the above syntax, the Attribute-list contains the attribute elements that maps to a list of element names separated by a white space.

<xsl:processing-instruction>

The <xsl:processing-instruction> element generates a processing instruction node in the resultant document. The syntax for this element is:

<xsl:processing-instruction Attribute-list > <!-- Content: sequence-constructor --> </xsl:processing-instruction>

In the above syntax, the Attribute-list contains the ncname of the node.

<xsl:result-document>

The <xsl:result-document> element generates multiple resultant documents. The syntax for this element is:

<xsl:result-document Attribute-list > <!-- Content: sequence-constructor --> </xsl:result-document>

In the above syntax, the Attribute-list contains the attributes:

  • format = qname

  • href = { uri-reference }

  • validation = "strict" | "lax" | "preserve" | "strip"

  • as = sequence-type

<xsl:script>

The <xsl:script> element defines and identifies extension functions in the stylesheet during processing. The syntax for this element is:

<xsl:script Attribute-list> text </xsl:script>

In the above syntax, the Attribute-list contains the attributes:

  • implements-prefix = NCName

  • language = "ecmascript" | "javascript" | "java" | Qname

  • src = URI

  • archive = list of URIs

<xsl:sequence>

The <xsl:sequence> element returns a sequence, constructed using the sequence specified in the select attribute. The syntax for this element is:

<xsl:sequence Attribute-list <!-- Content: sequence-constructor --> </xsl:sequence>

In the above syntax, the Attribute-list contains the attributes:

  • select = expression

  • as = sequence-type

This element adds a sequence to the existing node by constructing a new node.

<xsl:sort>

The <xsl:sort> element sorts the nodes in the source document. The syntax for this element is:

<xsl:sort Attribute-list/>

In the above syntax, the Attribute-list contains the attributes:

  • select = expression

  • lang = { nmtoken }

  • order = { "ascending" | "descending" }

  • collation = { uri }

  • case-order = { "upper-first" | "lower-first" }

  • data-type = { "text" | "number" | qname-but-not-ncname }

The <xsl:sort> element is always used as a child element of the <xsl:apply-templates> or the <xsl:for-each> elements. The nodes selected by the <xsl:apply-templates> or the <xsl:for-each> element are processed in the order specified by the <xsl:sort> element.

<xsl:sort-key>

The <xsl:sort-key> element defines the named sort specification used in the sort() function. The syntax for this element is:

<xsl:sort-key Attribute-list> <!-- Content: (xsl:sort+) --> </xsl:sort-key>

In the above syntax, the Attribute-list contains a qualified name of the sort specification. You can define multiple <xsl:sort> elements within the <xsl:sort-key> element.

<xsl:strip-space>

The <xsl:strip-space> element removes all the white space nodes in the source document when transforming to the resultant document. The syntax for this element is:

<xsl:strip-space Attribute-list />

In the above syntax, the Attribute-list contains a list of white space separated element names.

<xsl:stylesheet>

The <xsl:stylesheet> element is the root element of the XSLT stylesheet document. The syntax for this element is:

<xsl:stylesheet Attribute-list> <!-- Content: (xsl:import*, other-declarations) --> </xsl:stylesheet>

In the above syntax, the Attribute-list contains the attributes:

  • id = id

  • extension-element-prefixes = tokens

  • exclude-result-prefixes = tokens

  • version = number

  • xpath-default-namespace = uri

  • default-validation = "strict" | "lax" | "preserve" | "strip"

This element specifies the namespace URI of the document and the version of XSLT.

<xsl:template>

The <xsl:template> element contains the set of rules and matching patterns to generate a node in the resultant document. This element is used within the <xsl:stylesheet> element. The syntax for this element is:

<xsl:template Attribute-list> <!-- Content: (xsl:param*, sequence-constructor) --> </xsl:template>

In the above syntax, the Attribute-list contains the attributes:

  • match = pattern

  • name = qname

  • priority = number

  • mode = tokens

  • as = sequence-type

<xsl:transform>

The <xsl:transform> element is an alternative element for the <xsl:stylesheet> element, and is used to transform documents. The syntax for this element is:

<xsl:transform Attribute-list> <!-- Content: (xsl:import*, other-declarations) --> </xsl:transform>

In the above syntax, the Attribute-list contains the attributes:

  • id = id

  • extension-element-prefixes = tokens

  • exclude-result-prefixes = tokens

  • version = number

  • xpath-default-namespace = uri

  • default-validation = "strict" | "lax" | "preserve" | "strip"

Depending on the role of XSLT as a transformation language or as a stylesheet language, you can use the <xsl:transform> and <xsl:stylesheet> elements, respectively.

<xsl:value-of>

The <xsl:value-of>element reads and copies the value of an element or attribute in the source document to the resultant document. The syntax for this element is:

<xsl:value-of Attribute-list/>

In the above syntax, the Attribute-list contains the attributes:

  • select = expression

  • separator = { string }

  • disable-output-escaping = "yes" | "no"

<xsl:variable>

The <xsl:variable> element declares variables within the stylesheet. The syntax for this element is:

<xsl:variable Attribute-list> <!-- Content: sequence-constructor --> </xsl:variable>

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • select = expression

  • as = sequence-type

<xsl:when>

The <xsl:when> element is always used within the <xsl:choose> element. The syntax for this element is:

<xsl:when Attribute-list> <!-- Content: sequence-constructor --> </xsl:when>

In the above syntax, the Attribute-list contains the test attribute that refers to an expression. Within the <xsl:choose> element, multiple <xsl:when> elements can be used. If the condition specified in any of the <xsl:when> element is satisfied, the expression is evaluated and returned to the <xsl:choose> element. When all the conditions specified in the <xsl:when> elements are not met, the statements of the <xsl:otherwise> element are executed.

<xsl:with-param>

The <xsl:with-param> element passes a parameter to the template element. The syntax for this element is:

<xsl:with-param Attribute-list> <!-- Content: sequence-constructor --> </xsl:with-param>

In the above syntax, the Attribute-list contains the attributes:

  • name = qname

  • select = expression





sads

SOA Overview Part-1

  Middleware It provides a mechanism for the process to interact with other processes running on multiple network machines. Advantages...