Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading content…
Transcript

Question

DTD

ELEMENT DECLARATIONS

<!ELEMENT element_name (list of child names)>

Child element specification modifiers -> +, *, ?

<!ELEMENT element_name (#PCDATA)> ANY and EMPTY

ATTRIBUTE DECLARATIONS

<!ATTLIST element_name attribute_name attribute type [default_value]>

Possible Default values ->

some value

#FIXED value

#REQUIRED

#IMPLIED

ENTITY DECLARATIONS

<!ENTITY entity_name “entity_value”>

<!ENTITY entity_name SYSTEM “file_location”>

NOTATIONS

  • Constructing table - display:table

Adding a row to the table – display:table-row

Adding a cell to the row – display:table-cell

displaying attributes :

elementname:after {content:attr(“attributename”)}

Linking to CSS file:

<?xml-stylesheet type=“text/css” ref=“a.css”?>

C S S

Limitations of CSS

Change the order of elements in the document

Make computations on the content of the document

Add content to the document

Combine multiple documents into one

X S L T

eXtensible StyleSheet Language (XSL) is a family of recommendations for defining XML document transformations and presentation

XSL consists of XSL Transformations (XSLT),

XML Path Language (XPath),

XSL Formatting Objects (XSL-FO)

Template Driven Model

Data Driven Model

XSL Document Structure

<xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform

xmlns=http://www.w3.org/1999/xhtml>

Template specification :

<xsl:template match=“xpath expression”>

Value of an element <xsl:value-of select=“xpath”>

Looping using <xsl:for-each select=“xpath”>

Sorting using <xsl:sort select=“xpath” order=“ascending | descending” />

<?xml-stylesheet type=“text/xsl” href=“a.xsl”?>

XML

4. a) Design an XML document to store information about a student in an

engineering college affiliated to VTU. The information must include USN, Name, Name of the College, Branch, Year of Joining, and e-mail id. Make up sample data for 3 students. Create a CSS style sheet and use it to display the document.

b) Create an XSLT style sheet for one student element of the above document and use it to create a display of that element.

XSLT is a powerful language for transforming documents. It was created to allow developers the ability to create data and then transform it to various different formats. It is meant to keep the distinction between content and design separate.

XSL Document

XSLT Processor

XSLT Document

XML Document

Learn more about creating dynamic, engaging presentations with Prezi