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

I A FOR WEBSITE DESIGN

Question No. 1
What are HTML Logical tags?

Explain all the logical tags.

Ans:
Html logical tags are those tags which defines the relative appearance
of text. They allow the browser to define precisely on how to display
the information on our webpage. To shade more light to the above,
the

logical

tags

basically

are

those

tags

used

in

rendering

information's in a proper way on a webpage.


Explanation of all logical tags :

<var> : These marks up a variable name. It is used when one is

writing
about technical subjects like computer programming.

<kbd> : This is used to display characters in a keyboard font


type.

<address> : this is used in the displaying of contact information


or maybe address information's including email ID as well.

<code> : This is used to display the text as computer programs


code using CODE tag and usually with a property of mono space
font. It also acts similar to <tt> tag.

<em> : This tag is also similar to <i> tag by property. It simply


implies to the text given after the tag.

<strong> : The tag simply displays a bold text for the given
string after the tag. The property is similar to <b> tag as bold.

<q> : This is a short quotation from another source.

<cite> : It is used to enclose the title of a work that is currently


referred to. Often displays as italicized text.

<h1></h1> .........to.........<h6></h6> : These are set as


heading tags. They have fixed font size and create headings. The
size arranged sequentially from 1 through 6. Are set as block level
element. This depends on the choice of the programmer on what

level block to be used for a webpage.

<pre> : This is a block level element used to display text in a


fixed-width manner exactly how it is typed in the source code.
Which is by including all tab space and line breaks. The pre is not
strictly a logical tag element. But the usage is often mandatory.

<blockquote> : This is used to include multiline quotation from


other source.

<del> : The del tag is a HTML 4 tag, used to show document


revisions: Text which are deleted from a page in this case. This is
often displayed as text has a strike-through.

Question No. 2
Describe the following in context of validating XML
documents
with DTDs
1. Concept of data validation
2. Writing document type definition (DTD) files
3. Internal and external DTDs
4. Validating parsers
5. The NMTOKEN and NMTOKENS Type
Ans:
Concept of data validation :

The main requirement of the data validation is to determine


whether all documents confirm to the rule it describes. Application
programs that process the data in the collection of XML documents
can be written to assume the particular document
form.

Without

such

structural

restrictions,

developing

such

applications would be difficult.


Writing document type definition (DTD) files :
A Document Type Definition (DTD) is a set of structural rules called
declarations, which specify a set of elements that can appear in the
document as well as how and where these elements may appear.
Not all XML documents need a DTD. DTDs are used when the same
tag set definition is used by a collection of documents, perhaps by a
collection of users, and the collection must have a consistent and
uniform structure. The purpose of a DTD is to define a standard
form for a collection of XML documents. This form is specified as the
tag and attributes sets, as well as rules that define how they can
appear in a document. DTDs also provide entity definitions. All
documents in the collection can be tested against the DTD to
determine whether they conform to the rules it describes.
Internal and external DTDs :
A DTD can be embedded in the XML document whose syntax rules it
describes, in which case it is called an internal DTD. The alternative
is to have the DTD stored in a separate file, in which case it is called
an external DTD. Because external DTDs allow use with more than
one XML document, they are preferable.
If the DTD is included in the XML code, it must be introduced with
<!DOCTYPE rootname [ and terminated with ]>. For example, the
structure of the planes XML document with its DTD included is as
follows:

<?xml version = 1.0 encoding =utf-8


?>
<!DOCTYPE planes [
<!-- the DTD for planes
-->
]>
<!--The planes XML Document -->
Now, when you use an external DTD, the XML document includes a
DOCTYPE declaration as its second line.
This declaration has the following form:
<!DOCTYPE

XML_document_root_name

SYSTEM

DTD_file_name>
<!--The XML Document -->
Validating parsers :
The XML-parsers are used to read and modify XML and are build
into almost all the contemporary browsers. The parser reads XML
and converts into an XML DOM object which can be read through
javascript. However the Microsoft

XML

parser differ from other

parser used in other browsers. Even In that Microsoft parser


manages to load in both the XML files and XML strings whereas
other browser need a separate parsers these. All the parsers offer
functions to traverse XML trees and access, inserting and the
deleting of nodes and their attributes.
The NMTOKEN and NMTOKENS Type:
In real sense, an XML name token and XML name are very similar.
The character in which they consist on are the same. Both can
never contain white space. They differ in the character which is
allowed to be a first character. In the case of a name token, any

character is allowed. But in the case of the XML name, only letters,
ideographs, and Underscore are allowed as first character. Thus the
34 and .abcde are valid XML name token but are not allowed as
valid XML names. Every valid name is a valid XML name token, but
not all valid XML name token are valid XML names.
Looking through the simple scenario bellow:
<!ATTLIST journal year NMTOKEN #REQUIRED>
The above tag statement still doesn't prevent the document author
from assigning the year attribute values like "99" or "March", but it
at least eliminates some possible wrong values, especially those
that contain whitespace such as "1990 C.E." or "Jimmy had a little
lamb."
A NMTOKENS type attribute contains one or more XML name tokens
separated by whitespace. For example, you might use this to
describe the dates attribute of a performances element, if the dates
were given in the form 08-26-2000,
like this:
<performances dates="09-23-2002 08-23-2001 08-27-2001">
Kat and the Kings
</performances>
The appropriate declaration is:
<!ATTLIST performances dates NMTOKENS
#REQUIRED>
On the other hand, you could not use this for a list of dates in the
form 08/27/2001 because the forward slash is not a legal name
character.

Question No. 3
Define XSL-FO. Explain the following:
1. Purpose of XSL Formatting Objects (XSL-FO)
2. XSL-FO Documents and XSL-FO Processors
Ans
XSL-FO :
XSL-FO is defined as

a markup language for XML document

formatting which is most often used to generate PDFs, and is also a


part of XSL (Extensible Stylesheet Language), a set of W3C
technologies designed for the transformation and formatting of XML
data.
Purpose of XSL Formatting Objects (XSL-FO) :
The reason or purpose of the XSL-FO is to provide a mechanism for
formatting XML data for print screen and other output media. XSLFO, also refer to as XSL is a specification of the World Wide Web and
also closely related to XSLT.

However, whereas XSLT is most

frequently used for transforming XML into HTML structures, XSL-FO


is most frequently used for formatting XML for print.
In addition, transforming XML for print is accomplished by
transforming an

XML document to a formatting object (FO)

document, which itself is XML-based, via XSLT.

The formatting

object processor is able to read the FO document and transform it


for different type of print output. The most common and best
supported print output is currently Adobe PDF.
XSL-FO Documents and XSL-FO Processors:
XSL-FO documents are XML files with output information. They
contain information about the output layout and output contents.

XSL-FO documents are stored in files with a .fo or a .fob file


extension. It is also quite common to see XSL-FO documents stored
with an .xml extension, because this makes them more accessible
to XML editors.
XSL-FO documents structure illustrated bellow as:

<?xml version="1.0" encoding="ISO-8859-1"?>


<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
<!-- Page template goes here -->
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<!-- Page content goes here -->
</fo:page-sequence>
</fo:root>
XSL-FO documents are XML documents, and must always start with
an
XML declaration:
<?xml version="1.0" encoding="ISO-8859-1"?>
The <fo:root> element is the root element of XSL-FO documents.
The root element also declares the namespace for XSL-FO:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- The full XSL-FO document goes here -->
</fo:root>
The <fo:layout-master-set> element contains one or more page
templates:
<fo:layout-master-set>
<!-- All page templates go here -->
</fo:layout-master-set>

Each <fo:simple-page-master> element contains a single page


template.
Each template must have a unique name (master-name) :
<fo:simple-page-master master-name="A4">
<!-- One page template goes here -->
</fo:simple-page-master>
One or more <fo:page-sequence> elements describe the page
contents. The master-reference attribute refers to the simple-pagemaster template with the same name:
<fo:page-sequence master-reference="A4">
<!-- Page content goes here -->
</fo:page-sequence>

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