Вы находитесь на странице: 1из 21

Unit 4 Questions

1) Write short note on VBScript Variables


Variable is a named memory location used to hold a value that can be changed during the
script execution. VBScript has only ONE fundamental data type, Variant.
Rules for Declaring Variables:
 Variable Name must begin with an alphabet.
 Variable names cannot exceed 255 characters.
 Variables Should NOT contain a period(.)
 Variable Names should be unique in the declared context.

Declaring Variables
Variables are declared using “dim” keyword. Since there is only ONE fundamental data type,
all the declared variables are variant by default. Hence, a user NEED NOT mention the type
of data during declaration.
Example 1: In this Example, IntValue can be used as a String, Integer or even arrays.
Dim Var
Example 2: Two or more declarations are separated by comma(,)
Dim Variable1,Variable2

Assigning Values to the Variables


Values are assigned similar to an algebraic expression. The variable name on the left hand
side followed by an equal to (=) symbol and then its value on the right hand side.
Rules:
 The numeric values should be declared without double quotes.
 The String values should be enclosed within doublequotes(")
 Date and Time variables should be enclosed within hash symbol(#)

Examples:
' Below Example, The value 25 is assigned to the variable.
Value1 = 25

' A String Value ‘VBScript’ is assigned to the variable StrValue.


StrValue = “VBScript”

' The date 01/01/2020 is assigned to the variable DToday.


Date1 = #01/01/2020#

' A Specific Time Stamp is assigned to a variable in the below example.


Time1 = #12:30:44 PM#

Scope of the Variables


Variables can be declared using the following statements that determines the scope of the
variable. The scope of the variable plays a crucial role when used within a procedure or
classes.
 Dim
 Public
 Private
Dim
Variables declared using “Dim” keyword at a Procedure level are available only
within the same procedure. Variables declared using “Dim” Keyword at script level are
available to all the procedures within the same script.

Public
Variables declared using "Public" Keyword are available to all the procedures across
all the associated scripts. When declaring a variable of type "public", Dim keyword is
replaced by "Public".

Private
Variables that are declared as "Private" have scope only within that script in which
they are declared. When declaring a variable of type "Private", Dim keyword is replaced by
"Private".

2) Discuss explicit declaration in VBScript.


Explicit Declaration
Declaring variables before using them is called as Explicit Declaration of variables. This is
what we have done above.
Eg: Dim age
In option explicit, if a user tries to use the variables which are not declared in
case of Option Explicit then an error occurs. It is always recommended to use
‘Option Explicit’ at the top of the code.
<% option explicit %>

If used, the Option Explicit statement must appear in a script before any procedures.
When you use the Option Explicit statement, you must explicitly declare all variables using
the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable
name, an error occurs.
The following example illustrates use of the Option Explicit statement:

Option Explicit ' Force explicit variable declaration.


Dim MyVar ' Declare variable.
MyInt = 10 ' Undeclared variable generates error.
MyVar = 10 ' Declared variable does not generate error.
3) Explain any three string handling functions of VBScript.
1) LCase Function:- The LCase function converts a specified string to lowercase.

Syntax
LCase(string)
Example 1
<script language="vbscript" type="text/vbscript">
txt="THIS IS A BEAUTIFUL DAY!"
document.write (LCase(txt))
</script>
The output of the code above will be:
this is a beautiful day!

2) StrComp Function:- The StrComp function compares two strings and returns a
value that represents the result of the comparison.
The StrComp function can return one of the following values:
 -1 (if string1 < string2)
 0 (if string1 = string2)
 1 (if string1 > string2)
 Null (if string1 or string2 is Null)

Syntax
StrComp(string1,string2[,compare])

Example 1
document.write(StrComp("VBScript","VBScript"))
Output:
0

Example 2
document.write(StrComp("VBScript","vbscript"))
Output:
-1

3) Len Function:- The Len function returns the number of characters in a string.
Syntax
Len(string)
Example
<script language="vbscript" type="text/vbscript">
txt="This is a beautiful day!"
document.write(Len(txt))
</script>
The output of the code above will be:
24
4) What is XML and XSL? Discuss in brief.
What is XML?
 XML stands for eXtensible Markup Language
 XML is a markup language much like HTML
 XML was designed to store and transport data
 XML was designed to be self-descriptive
The Difference Between XML and HTML
XML and HTML were designed with different goals:
 XML was designed to carry data - with focus on what data is
 HTML was designed to display data - with focus on how data looks
 XML tags are not predefined like HTML tags are
XML Simplifies Things
 It simplifies data sharing
 It simplifies data transport
 It simplifies platform changes
 It simplifies data availability

XML Syntax Rules


XML Documents Must Have a Root Element
XML documents must contain one root element that is the parent of all other elements:
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
This line is called the XML prolog:
<?xml version="1.0" encoding="UTF-8"?>
The XML prolog is optional. If it exists, it must come first in the document.
All XML Elements Must Have a Closing Tag
XML Tags are Case Sensitive
XML tags are case sensitive. The tag <Letter> is different from the tag <letter>.
XML Elements Must be Properly Nested
XML Attribute Values Must Always be Quoted

XSL stands for EXtensible Stylesheet Language. XSLT is the most important part of XSL.
XSLT is used to transform an XML document into another XML document, or another type
of document that is recognized by a browser, like HTML and XHTML.
How Does it Work?
In the transformation process, XSLT uses XPath to define parts of the source
document that should match one or more predefined templates. When a match is found,
XSLT will transform the matching part of the source document into the result document.
5) Explain Looping Structures of VBScript
A loop statement allows us to execute a statement or group of statements multiple
times and following is the general from of a loop statement in VBScript.

If you want to send an invitation to 10 people with the same message then you can use ‘for
loop’ in this case as a counter is fixed and you know the message which is to be repeated 10
times.

The syntax of the loop will be as follows:


For i = 1 to 10
Msgbox “Please do come to my party”
Next

VBScript provides the following types of loops to handle looping requirements


Loop Type Description
for loop Executes a sequence of statements multiple times and
abbreviates the code that manages the loop variable.
for ..each loop This is executed if there is at least one element in group
and reiterated for each element in a group.
while..wend loop This tests the condition before executing the loop body.
do..while loops The do..While statements will be executed as long as
condition is True.(i.e.,) The Loop should be repeated till
the condition is False.
do..until loops The do..Until statements will be executed as long as
condition is False.(i.e.,) The Loop should be repeated till
the condition is True.

Loop Control Statements


Loop control statements change execution from its normal sequence. When execution
leaves a scope, all the remaining statements in the loop are NOT executed.
VBScript supports the following control statements.
Control Statement Description
Exit For statement Terminates the For loop statement and transfers
execution to the statement immediately following the
loop
Exit Do statement Terminates the Do While statement and transfers
execution to the statement immediately following the
loop

6) Write a script which prints Fibonacci series from 1 to 10


<html>
<body><center>
<script type="text/vbscript">
dim a,b,c,i
a=0
b=1
for i=1 to 100
c=a+b
document.write(b&"<br/>")
a=b
b=c
next
</script>
</center></body>
</html>

7) Write short note on VBScript Operators.


VBScript language supports following types of operators:
 Arithmetic Operators
 Comparison Operators
 Logical (or Relational) Operators
 Concatenation Operators

Arithmetic Operators
Assume variable A holds 5 and variable B holds 10, then:
Operator Description Example
+ Adds two operands A + B will give 15
- Subtracts second operand from the first A - B will give -5
* Multiply both operands A * B will give 50
/ Divide numerator by denumerator B / A will give 2
% Modulus Operator and remainder of after an B MOD A will
integer division give 0
^ Exponentiation Operator B ^ A will give
10000
Comparison Operators
Assume variable A holds 10 and variable B holds 20, then
Operator Description Example
== Checks if the value of two operands are equal or not, (A == B) is
if yes then condition becomes true. False.
<> Checks if the value of two operands are equal or not, (A <> B) is
if values are not equal then condition becomes true. True.
> Checks if the value of left operand is greater than the (A > B) is
value of right operand, if yes then condition becomes False.
true.
< Checks if the value of left operand is less than the (A < B) is
value of right operand, if yes then condition becomes True.
true.
>= Checks if the value of left operand is greater than or (A >= B) is
equal to the value of right operand, if yes then False.
condition becomes true.
<= Checks if the value of left operand is less than or equal (A <= B) is
to the value of right operand, if yes then condition True.
becomes true.

Logical Operators
Assume variable A holds 10 and variable B holds 0, then:
Operator Description Example
AND Called Logical AND operator. If both the a<>0 AND
conditions are True then Expression becomes true. b<>0 is False.
OR Called Logical OR Operator. If any of the two a<>0 OR b<>0
conditions are True then condition becomes true. is true.
NOT Called Logical NOT Operator. Use to reverses the NOT(a<>0 OR
logical state of its operand. If a condition is true b<>0) is false.
then Logical NOT operator will make false.
XOR Called Logical Exclusion. It is the combination of (a<>0 XOR
NOT and OR Operator. If one, and only one, of b<>0) is true.
the expressions evaluates to True, result is True.

Concatenation Operators
Assume variable A holds 5 and variable B holds 10 then:
Operator Description Example
+ Adds two Values as Variable Values are A + B will give 15
Numeric
& Concatenates two Values A & B will give
510

Assume variable A="Microsoft" and variable B="VBScript", then:


Operator Description Example
+ Concatenates two Values A + B will give MicrosoftVBScript
& Concatenates two Values A & B will give MicrosoftVBScript
8) Explain TRIM, RTRIM and LTRIM functions.
Trim:-The Trim Function removes both the Leading and Trailing blank spaces of the given
input string.
Syntax
Trim(String)
Example
<html>
<body>
<script language="vbscript" type="text/vbscript">
var = " Microsoft VBScript "
document.write("After Trim : " & Trim(var) & "<br />")

</script>
</body>
</html>
Output: After trim : Microsoft VBScript

LTrim:-The Ltrim Function removes the blank spaces that are there on the left side of the
string.
Syntax
LTrim(String)

Example
<html>
<body>
<script language="vbscript" type="text/vbscript">
var = " Microsoft VBScript"
document.write("After Ltrim : " & LTrim(var) & "<br />")
</script></body>
</html>
RTrim:- The Rtrim Function removes the blank spaces that are there on the Right side of
the string.
Syntax
RTrim(String)
Example
<html>
<body>
<script language="vbscript" type="text/vbscript">
var = "Microsoft VBScript "
document.write("After Rtrim : " & RTrim(var) & "<br />")
</script></body>
</html>
Output: After Rtrim : Microsoft VBScript
9) Explain ElseIf statement with suitable example.
The basic idea of the ElseIf statement is to create an If Statement within another If
Statement. This way you can check for many different cases in a single If Statement clause.

Example:-
<script type="text/vbscript">
Dim temperature
temperature = 65
If temperature > 70 Then
document.write("Wear a T-Shirt!")
ElseIf temperature > 60 Then
document.write("Wear a hat!")
ElseIf temperature > 50 Then
document.write("Wear a long-sleeved shirt!")
Else
document.write("Wear a coat!")
End If

</script>
Output:
Wear a hat!

Here temperature was set to 65 and failed the first If Statement condition because 65
is not greater than 70. However, on the first ElseIf Statement we found that 65 was greater
than 60 and so that block of code document.write("Wear a hat!")was executed. Because there
was a success the If Statement then finishes and our VBSCript would begin again on the line
of code following End If

10) Explain For-Next statement with suitable example


For Loop:-Looping statements are used to run the same block of code a specified number
of times.Use the For...Next statement to run a block of code a specified number of times.

Syntax
The syntax of a for loop in VBScript is:
For counter = start To end [Step stepcount]
[statement 1]
[statement 2]
....
[statement n]
[Exit For]
[statement 11]
[statement 22]
....
[statement n]
Next
counter - Numeric variable used as a loop counter. The variable can't be an
array item or an item of a user-defined type.
start - Initial value of the counter variable.
end - Final value of the counter variable.
stepcount - Amount the counter variable is changed each time through the loop.
If not set, then is 1.
statements - One or more statements between For and Next that are executed
the specified number of times.
Exit-You can exit a For...Next statement with the Exit For keyword.
For Example
For i=1 To 10
If i=5 Then Exit For
some code
Next

Example
<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">
Dim a=10
For i=0 to a Step 2 'i is the counter variable and it is incremented by 2
document.write("The value is : " &i)
document.write("<br></br>")
Next
</script></body></html>
Output
The value is : 0
The value is : 2
The value is : 4
The value is : 6
The value is : 8
The value is : 10
11) Difference between HTML and XML.
XML HTML

XML stands for “Extensible Mark Up HTML stands for


Language“. “HyperTextMarkupLanguage“.
XML is focuses on data stored and how its HTML is focuses on display and look of data
carried and described i.e. ‘HTML Defines or Displays the Data‘.
In XML once a tag is opened, it must be In HTML, its not necessary to close a tag.This
closed. is a paragraph.
XML is Case Sensitive i.e. Opening and HTML is not Case Sensitive.
closing tags must be in the same case.
In XML, there is no pre-defined tags, user In HTML,there is pre-defined tags and user
have to define his own tags. have to use those tags.
In XML, user can define his own tags as in HTML, structure of HTML document as
well as structure of document. well as tags are pre-defined.
XML is an extensible so user can add own HTML is markup language having its pre-
tags to extend the XML. defined tags and user can’t add own tags.
In XML value of attribute must always be In HTML it is not necessary to quote the
quoted. values.
In XML, Elements must be nested properly. HTML is not so sensitive so it allows
improper nesting.
There is only Paired Tag in XML. There is Both types of tags, Paired
tags and Singular Tags in HTML.
In XML, white space is preserved. In HTML, multiple white space is truncated to
one single white space i.e. white space is not
preserved.

12) Describe features of XML


1) XML separates data from HTML
With XML, data can be stored in separate XML files. This way you can focus on
using HTML/CSS for display and layout, and be sure that changes in the underlying data will
not require any changes to the HTML.

2) XML simplifies data sharing


XML data is stored in plain text format. This provides a software- and hardware-
independent way of storing data.

3) XML simplifies data transport


Exchanging data as XML greatly reduces this complexity, since the data can be read by
different incompatible applications.

4) XML simplifies Platform change


XML data is stored in text format. This makes it easier to expand or upgrade to new
operating systems, new applications, or new browsers, without losing data.
5) XML increases data availability
6) XML can be used to create new internet languages
13) Explain For-Next and While-Wend looping
For Loop:-Looping statements are used to run the same block of code a specified number
of times.Use the For...Next statement to run a block of code a specified number of times.

Syntax
The syntax of a for loop in VBScript is:
For counter = start To end [Step stepcount]
[statement 1]
[statement 2]
....
[statement n]
[Exit For]
[statement 11]
[statement 22]
....
[statement n]
Next

counter - Numeric variable used as a loop counter. The variable can't be an


array item or an item of a user-defined type.
start - Initial value of the counter variable.
end - Final value of the counter variable.
stepcount - Amount the counter variable is changed each time through the loop.
If not set, then is 1.
statements - One or more statements between For and Next that are executed
the specified number of times.
Exit-You can exit a For...Next statement with the Exit For keyword.
For Example
For i=1 To 10
If i=5 Then Exit For
some code
Next

Example
<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">
Dim a=10
For i=0 to a Step 2 'i is the counter variable and it is incremented by 2
document.write("The value is : " &i)
document.write("<br></br>")
Next
</script></body></html>
Output
The value is : 0
The value is : 2
The value is : 4
The value is : 6
The value is : 8
The value is : 10

While..Wend loop:-In a While..Wend loop, if the condition is True, all statements are
executed until Wend keyword is encountered.
If the condition is false, the loop is exited and the control jumps to very next statement after
Wend keyword.

Syntax
The syntax of a While..Wend loop in VBScript is:
While condition(s)
[statements 1]
[statements 2]
...
[statements n]
Wend

Example
<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">

Dim Counter : Counter = 10


While Counter < 15 ' Test value of Counter.
Counter = Counter + 1 ' Increment Counter.
document.write("The Current Value of the Counter is : " & Counter)
document.write("<br></br>")
Wend ' While loop exits if Counter Value becomes 15.

</script>
</body>
</html>
Output:-
The Current Value of the Counter is : 11
The Current Value of the Counter is : 12
The Current Value of the Counter is : 13
The Current Value of the Counter is : 14
The Current Value of the Counter is : 15
14) Explain string handling functions of VB script.
Strings are a sequence of characters, which can consist of alphabets or numbers or special
characters or all of them. A variable is said to be a string if it is enclosed within double quotes
""
Syntax
variablename = "string"

Examples
str1 = "string" ' Only Alphabets
str2 = "132.45" ' Only Numbers
str3 = "!@#$;*" ' Only Special Characters
Str4 = "Asc23@#" ' Has all the above

There are predefined VBScript String functions, which help the developers to work with the
strings very effectively. Below are String methods that are supported in VBScript.

LCase Converts a specified string to lowercase


Left Returns a specified number of characters from the left side of a string
Len Returns the number of characters in a string
LTrim Removes spaces on the left side of a string
RTrim Removes spaces on the right side of a string
Trim Removes spaces on both the left and the right side of a string
Mid Returns a specified number of characters from a string
Replace Replaces a specified part of a string with another string a specified number of
times
Right Returns a specified number of characters from the right side of a string
Space Returns a string that consists of a specified number of spaces
StrComp Compares two strings and returns a value that represents the result of the
comparison
String Returns a string that contains a repeating character of a specified length
StrReverse Reverses a string
UCase Converts a specified string to uppercase
The String function returns a string that contains a repeating character of a specified length.
Syntax
String(number,character)

Example
response.write(String(10,"a"))
Output:
aaaaaaaaaa
15) Explain Logical Structures of VBScript
VBScript is a ‘Scripting Language’. It is a lightweight case insensitive programming
language developed by Microsoft.
<html>
<body>
<script language="vbscript" type="text/vbscript">
document.write("Hello World!")
</script>
</body>
</html>
In the above example, we called a function document.write, which writes a string into the
HTML document. This function can be used to write text, HTML or both.
Whitespace and Line Breaks: - VBScript ignores spaces, tabs and newlines that appear
within VBScript programs

Formatting: -
Single Line Syntax:-Colons are used when two or more lines of VBScript ought to be
written in a single line.
<script language="vbscript" type="text/vbscript">
var1 = 10: var2 = 20
</script>

Multiple Line Syntax: -When a statement in VBScript is lengthy and if user wishes to break
it into multiple lines, then the user has to use underscore "_".
<script language="vbscript" type="text/vbscript">
var1 = 10
var2 = 20
Sum = var1 + var2
document.write("The Sum of two numbers"&_
"var1 and var2 is " & Sum)
</script>

Comments:-Any statement that starts with a Single Quote (‘) is


treated as comment. Any statement that starts with the keyword
“REM”.
<script language="vbscript" type="text/script">
<!—
' This Script is invoked after successful login
REM Written by :TutorialsPoint
' Return Value : True / False
//- >
</script>

VBScript Placement in HTML File:-There is a flexibility given to include VBScript code


anywhere in an HTML document.
Script in <head>...</head> section.
Script in <body>...</body> section.
Script in <body>...</body> and <head>...</head> sections
16) Explain Subroutine and function
What is a Function?
A function is a group of reusable code which can be called anywhere in your program.
This eliminates the need of writing same code over and over again.
Function Definition
The most common way to define a function in VBScript is by using
the Function keyword, followed by a unique function name and it may or may not carry a list
of parameters and a statement with a End Function keyword

<script language="vbscript" type="text/vbscript">

Function sayHello()
msgbox("Hello there")
End Function
</script>

Calling a Function
To invoke a function somewhere later in the script, you would simple need to write
the name of that function with the Call keyword.
<script language="vbscript" type="text/vbscript">

Function sayHello()
msgbox("Hello there")
End Function

Call sayHello()
</script>

Function Parameters
<script language="vbscript" type="text/vbscript">

Function sayHello(name, age)


msgbox( name & " is " & age & " years old.")
End Function

Call sayHello("Tutorials point", 7)


</script>

Sub Procedures
Sub Procedures are similar to functions but there are few differences.
 Sub procedures DONOT Return a value while functions may or may not return a
value.
 Sub procedures Can be called without call keyword.
 Sub procedures are always enclosed within Sub and End Sub statements.
Sub mysub()
some statements
End Sub
or
Sub mysub(argument1,argument2)
some statements
End Sub
Example:
<script language="vbscript" type="text/vbscript">
Sub sayHello()
msgbox("Hello there")
End Sub
</script>

Calling Procedures
To invoke a Procedure somewhere later in the script, you would simply need to write the
name of that procedure with or without the Call keyword.
<script language="vbscript" type="text/vbscript">
Sub sayHello()
msgbox("Hello there")
End Sub
sayHello()</script>

17)List Maths Function and Explain Any three math Functions.


Function Description
Abs Returns the absolute value of a specified number
Atn Returns the arctangent of a specified number
Cos Returns the cosine of a specified number (angle)
Exp Returns e raised to a power
Hex Returns the hexadecimal value of a specified number
Int Returns the integer part of a specified number
Fix Returns the integer part of a specified number
Log Returns the natural logarithm of a specified number
Oct Returns the octal value of a specified number
Rnd Returns a random number less than 1 but greater or equal to 0
Sgn Returns an integer that indicates the sign of a specified number
Sin Returns the sine of a specified number (angle)
Sqr Returns the square root of a specified number
Tan Returns the tangent of a specified number (angle)

1) Abs Function:-The Abs function returns the absolute value of a specified number.
Syntax
Abs(number)

Example 1
<%
response.write(Abs(1) & "<br />")
response.write(Abs(-1))

%>
The output of the code above will be:
1
1
2) Exp Function:- The Exp function returns e raised to a power.
Syntax
Exp(number)
Example
<%
response.write(Exp(6.7) & "<br />")
response.write(Exp(-6.7))

%>
The output of the code above will be:
812.405825167543
1.23091190267348E-03

3) Int Function:- The Int function returns the integer part of a specified number.
Syntax
Int(number)

Example 1
<%
response.write(Int(6.83227) & "<br />")
response.write(Int(6.23443))

%>
The output of the code above will be:
6
6

4) Sqr Function:- The Sqr function returns the square root of a number.
Syntax
Sqr(number)
Example
<%
response.write(Sqr(9) & "<br />")
response.write(Sqr(0) & "<br />")
response.write(Sqr(47))
%>
The output of the code above will be:
3
0
6.85565460040104

18) Explain Select –case With example.


When a User want to execute a group of statements depending upon a value of an
Expression, then Select Case is used. Each value is called a Case, and the variable being
switched ON based on each case. Case Else statement is executed if test expression doesn't
match any of the Case specified by the user.
Syntax
The syntax of a Switch Statement in VBScript is:
Select Case expression
Case expressionlist1
statement1
statement2
....
....
statement1n
Case expressionlist2
statement1
statement2
....
....
Case expressionlistn
statement1
statement2
....
....
Case Else
elsestatement1
elsestatement2
....
....
End Select
Example:-
<%
day= 1

Select Case day


Case 1
response.write(" Sunday")
Case 2
response.write("Monday ")
Case 3
response.write(" Tuesday")
Case 4
response.write("Wednesday")
Case 5
response.write("Thursday")
Case 6
response.write("Friday")
Case Else
response.write("Saturday")
End Select
%>
Output: Sunday
19) Explain Delimiter used to Create Web page.
Read from book

20) Describe XML with attributes.


What is XML?
 XML stands for eXtensible Markup Language
 XML is a markup language much like HTML
 XML was designed to store and transport data
 XML was designed to be self-descriptive

XML elements can have attributes, just like HTML.Attributes are designed to contain data
related to a specific element.

XML Attributes Must be Quoted


Attribute values must always be quoted. Either single or double quotes can be used.
For a person's gender, the <person> element can be written like this:
<person gender="female">
or like this:
<person gender='female'>

 attributes cannot contain multiple values (elements can)


 attributes cannot contain tree structures (elements can)
 attributes are not easily expandable (for future changes)

Attribute Types
Following table lists the type of attributes −
Attribute Type Description
StringType It takes any literal string as a value..
TokenizedType This is a more constrained type. The TokenizedType attributes
are given as −
ID − It is used to specify the element as unique.
IDREF − It is used to reference an ID that has been named for
another element.
IDREFS − It is used to reference all IDs of an element.
ENTITY − It indicates that the attribute will represent an
external entity in the document.
ENTITIES − It indicates that the attribute will represent
external entities in the document.
NMTOKEN − It is similar to CDATA with restrictions on
what data can be part of the attribute.
EnumeratedType There are two types of enumerated attribute −
NotationType − It declares that an element will be referenced
to a NOTATION declared somewhere else in the XML
document.
Enumeration − Enumeration allows you to define a specific
list of values that the attribute value must match.
21) Define NULL and EMPTY data type of variable.
NULL: A special subtype to represent a variable assigned with a null value
EMPTY: A special subtype to represent a variable that has not been assigned with any
value yet.

22) Define: XSL


XSL stands for EXtensible Stylesheet Language. XSLT is the most important part of
XSL. XSLT is used to transform an XML document into another XML document, or another
type of document that is recognized by a browser, like HTML and XHTML.
How Does it Work?
In the transformation process, XSLT uses XPath to define parts of the source
document that should match one or more predefined templates. When a match is found,
XSLT will transform the matching part of the source document into the result document.

Вам также может понравиться