尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
Publishing XML
Style Sheet Languages
• Language that expresses the presentation of structured
documents.
– font, font size, font weight, background color, spacing between
elements, borders around the elements etc.
• Content can be reused in many contexts and presented in
various ways.
– One XML doc can be formatted in ‘n’ different ways just by
changing the style sheet.
– Different styles designated for different purposes like print,
web designing, presentations etc. with styles designed for the
specific medium
– Without changing the content in the doc itself
• Example of style sheet language:
– CSS
CSS
• CSS stands for Cascading Style Sheets.
• To apply style to the webpage.
• Style defines how to display the xml elements.
• CSS works much better with XML than with HTML
– XML elements does not have any predefined formatting
– No restriction of which CSS should be applied to which
elements
• CSS has a list of rules
– each rule as a specific format
property {selector: value}
• Types of style sheet
– Internal
– External
Using Style Sheet with XML
• In the XML we can include the CSS as:
<?xml-stylesheet type=”text/css” href=”mystyle.css”?>
@import url(mystyle.css);
• <?xml-stylesheet?> is the PI used to instruct the
browser that
– when XML file is loaded, apply the styles available in
the “mystyle.css” to the current document
– “type” attribute specifies the MIME type of the style
sheet
• text/css for CSS
• text/xsl for XSL
• Example: An XML doc to describe info about the
POEM
POEM {display: block}
TITLE {display: block; font-size: 18pt; font-weight:italics}
POET {display: block; margin-bottom: 10px}
STANZA {display: block; margin-bottom: 10px}
VERSE {display: block}
CSS Syntax
• A CSS rule has two main parts:
– A selector
– One or more declarations
empName { display: block }
• Selection of Elements
– Part of the css which specifies which elements it applies to
POEM {display : block} POEM is the selector
• Grouping Selectors
– apply same style to multiple elements
• Pseudo Class
– Sometimes it is required to style two elements of the same type in a
different way
– Example: one paragraph in italics and the other in bold
– To perform this add a class attribute to one of the elements and
then write a rule for the elements in the given class
Grouping Selectors
• You can group the selectors as:
CSS ID and Class
• Id selector is used to specify a style to a
unique element.
<Empid id=“h1”>
• Class selector is used to specify a style for a
group of elements.
<Empname class=“c1”>
<Empaddress class=“c1”>
Style Attribute
• Style attribute can be attached to the element
without editing the style sheet for the
document.
Page Layout with CSS

More Related Content

What's hot

XML Schemas
XML SchemasXML Schemas
XML Schemas
People Strategists
 
Xml schema
Xml schemaXml schema
Xml schema
Prabhakaran V M
 
Xsd
XsdXsd
XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
hamsa nandhini
 
XSD
XSDXSD
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
Abhishek Kesharwani
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
Kumar
 
00 introduction
00 introduction00 introduction
00 introduction
Baskarkncet
 
XML Schema
XML SchemaXML Schema
XML Schema
yht4ever
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
Baskarkncet
 
DTD
DTDDTD
DTD
Kumar
 
fundamentals of XML
fundamentals of XMLfundamentals of XML
fundamentals of XML
hamsa nandhini
 
Xml presentation
Xml presentationXml presentation
Xml presentation
Miguel Angel Teheran Garcia
 
Xml basics for beginning
Xml basics for beginningXml basics for beginning
Xml basics for beginning
Ahmad Awsaf-uz-zaman
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Abhra Basak
 
Basics of XML
Basics of XMLBasics of XML
Basics of XML
indiangarg
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
Pradeep Rapolu
 
Xml
XmlXml
XML
XMLXML

What's hot (20)

XML Schemas
XML SchemasXML Schemas
XML Schemas
 
Xml schema
Xml schemaXml schema
Xml schema
 
Xsd
XsdXsd
Xsd
 
XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
 
XSD
XSDXSD
XSD
 
Introduction to xml schema
Introduction to xml schemaIntroduction to xml schema
Introduction to xml schema
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
00 introduction
00 introduction00 introduction
00 introduction
 
XML Schema
XML SchemaXML Schema
XML Schema
 
01 xml document structure
01 xml document structure01 xml document structure
01 xml document structure
 
DTD
DTDDTD
DTD
 
fundamentals of XML
fundamentals of XMLfundamentals of XML
fundamentals of XML
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Xml basics for beginning
Xml basics for beginningXml basics for beginning
Xml basics for beginning
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Basics of XML
Basics of XMLBasics of XML
Basics of XML
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Xml
XmlXml
Xml
 
XML
XMLXML
XML
 

Viewers also liked

Applying xml
Applying xmlApplying xml
Applying xml
Kumar
 
Chapter1
Chapter1Chapter1
Chapter1
Jafar Nesargi
 
Forms of organization
Forms of organizationForms of organization
Forms of organization
Kumar
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
Kumar
 
1 introduction databases and database users
1 introduction databases and database users1 introduction databases and database users
1 introduction databases and database users
Kumar
 
Graphics devices
Graphics devicesGraphics devices
Graphics devices
Kumar
 

Viewers also liked (6)

Applying xml
Applying xmlApplying xml
Applying xml
 
Chapter1
Chapter1Chapter1
Chapter1
 
Forms of organization
Forms of organizationForms of organization
Forms of organization
 
2 database system concepts and architecture
2 database system concepts and architecture2 database system concepts and architecture
2 database system concepts and architecture
 
1 introduction databases and database users
1 introduction databases and database users1 introduction databases and database users
1 introduction databases and database users
 
Graphics devices
Graphics devicesGraphics devices
Graphics devices
 

Similar to Publishing xml

Xml
XmlXml
Chapter 11: Intro to CSS
Chapter 11: Intro to CSSChapter 11: Intro to CSS
Chapter 11: Intro to CSS
Steve Guinan
 
Cascading style sheets, Introduction to web programming
Cascading style sheets, Introduction to web programmingCascading style sheets, Introduction to web programming
Cascading style sheets, Introduction to web programming
LikhithaBrunda
 
DHTML
DHTMLDHTML
Css
CssCss
CSS.pptx
CSS.pptxCSS.pptx
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
alvindalejoyosa1
 
Css
CssCss
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
Sónia
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
elayelily
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
eShikshak
 
Css
CssCss
Unit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology projectUnit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology project
abhiramhatwar
 
Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)
Reshmi Rajan
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
Singsys Pte Ltd
 
CASCADING STYLE SHEETS (CSS).pptx
CASCADING STYLE SHEETS (CSS).pptxCASCADING STYLE SHEETS (CSS).pptx
CASCADING STYLE SHEETS (CSS).pptx
Asmr17
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
jeweltutin
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
M Ashraful Islam Jewel
 
Css syntax, teachin presentation
Css syntax, teachin presentationCss syntax, teachin presentation
Css syntax, teachin presentation
Zarry DIE
 
Css
CssCss

Similar to Publishing xml (20)

Xml
XmlXml
Xml
 
Chapter 11: Intro to CSS
Chapter 11: Intro to CSSChapter 11: Intro to CSS
Chapter 11: Intro to CSS
 
Cascading style sheets, Introduction to web programming
Cascading style sheets, Introduction to web programmingCascading style sheets, Introduction to web programming
Cascading style sheets, Introduction to web programming
 
DHTML
DHTMLDHTML
DHTML
 
Css
CssCss
Css
 
CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
 
Css
CssCss
Css
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css
CssCss
Css
 
Unit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology projectUnit 2 WT-CSS.pptx web technology project
Unit 2 WT-CSS.pptx web technology project
 
Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)Cascading Style Sheets(CSS)
Cascading Style Sheets(CSS)
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
CASCADING STYLE SHEETS (CSS).pptx
CASCADING STYLE SHEETS (CSS).pptxCASCADING STYLE SHEETS (CSS).pptx
CASCADING STYLE SHEETS (CSS).pptx
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
Css syntax, teachin presentation
Css syntax, teachin presentationCss syntax, teachin presentation
Css syntax, teachin presentation
 
Css
CssCss
Css
 

More from Kumar

Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar
 
region-filling
region-fillingregion-filling
region-filling
Kumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
Kumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
Kumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
Kumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
Kumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
Kumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
Kumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
Kumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
Kumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
Kumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
Kumar
 
Android tutorial (2)
Android tutorial (2)Android tutorial (2)
Android tutorial (2)
Kumar
 
Android structure
Android structureAndroid structure
Android structure
Kumar
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
Kumar
 
Sqlite
SqliteSqlite
Sqlite
Kumar
 
Android animations
Android animationsAndroid animations
Android animations
Kumar
 
Sop sample
Sop   sampleSop   sample
Sop sample
Kumar
 
Sop questions
Sop   questionsSop   questions
Sop questions
Kumar
 
Sop general mba
Sop   general mbaSop   general mba
Sop general mba
Kumar
 

More from Kumar (20)

Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
region-filling
region-fillingregion-filling
region-filling
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
 
Android tutorial (2)
Android tutorial (2)Android tutorial (2)
Android tutorial (2)
 
Android structure
Android structureAndroid structure
Android structure
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
 
Sqlite
SqliteSqlite
Sqlite
 
Android animations
Android animationsAndroid animations
Android animations
 
Sop sample
Sop   sampleSop   sample
Sop sample
 
Sop questions
Sop   questionsSop   questions
Sop questions
 
Sop general mba
Sop   general mbaSop   general mba
Sop general mba
 

Recently uploaded

Post init hook in the odoo 17 ERP Module
Post init hook in the  odoo 17 ERP ModulePost init hook in the  odoo 17 ERP Module
Post init hook in the odoo 17 ERP Module
Celine George
 
Non-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech ProfessionalsNon-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech Professionals
MattVassar1
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Kalna College
 
Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
khabri85
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
Kalna College
 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
Ben Aldrich
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
BiplabHalder13
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
Friends of African Village Libraries
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
MattVassar1
 
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
ShwetaGawande8
 
Slides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptxSlides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptx
shabeluno
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
Nguyen Thanh Tu Collection
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
Derek Wenmoth
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
MattVassar1
 
managing Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptxmanaging Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptx
nabaegha
 
What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17
Celine George
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
PriyaKumari928991
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Celine George
 

Recently uploaded (20)

Post init hook in the odoo 17 ERP Module
Post init hook in the  odoo 17 ERP ModulePost init hook in the  odoo 17 ERP Module
Post init hook in the odoo 17 ERP Module
 
Non-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech ProfessionalsNon-Verbal Communication for Tech Professionals
Non-Verbal Communication for Tech Professionals
 
Contiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptxContiguity Of Various Message Forms - Rupam Chandra.pptx
Contiguity Of Various Message Forms - Rupam Chandra.pptx
 
Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
 
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...220711130095 Tanu Pandey message currency, communication speed & control EPC ...
220711130095 Tanu Pandey message currency, communication speed & control EPC ...
 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 
Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024Library news letter Kitengesa Uganda June 2024
Library news letter Kitengesa Uganda June 2024
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
 
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
 
Slides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptxSlides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptx
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
BỘ BÀI TẬP TEST THEO UNIT - FORM 2025 - TIẾNG ANH 12 GLOBAL SUCCESS - KÌ 1 (B...
 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
 
managing Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptxmanaging Behaviour in early childhood education.pptx
managing Behaviour in early childhood education.pptx
 
What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17What are the new features in the Fleet Odoo 17
What are the new features in the Fleet Odoo 17
 
The Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptxThe Rise of the Digital Telecommunication Marketplace.pptx
The Rise of the Digital Telecommunication Marketplace.pptx
 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
 

Publishing xml

  • 2. Style Sheet Languages • Language that expresses the presentation of structured documents. – font, font size, font weight, background color, spacing between elements, borders around the elements etc. • Content can be reused in many contexts and presented in various ways. – One XML doc can be formatted in ‘n’ different ways just by changing the style sheet. – Different styles designated for different purposes like print, web designing, presentations etc. with styles designed for the specific medium – Without changing the content in the doc itself • Example of style sheet language: – CSS
  • 3. CSS • CSS stands for Cascading Style Sheets. • To apply style to the webpage. • Style defines how to display the xml elements. • CSS works much better with XML than with HTML – XML elements does not have any predefined formatting – No restriction of which CSS should be applied to which elements • CSS has a list of rules – each rule as a specific format property {selector: value} • Types of style sheet – Internal – External
  • 4. Using Style Sheet with XML • In the XML we can include the CSS as: <?xml-stylesheet type=”text/css” href=”mystyle.css”?> @import url(mystyle.css); • <?xml-stylesheet?> is the PI used to instruct the browser that – when XML file is loaded, apply the styles available in the “mystyle.css” to the current document – “type” attribute specifies the MIME type of the style sheet • text/css for CSS • text/xsl for XSL
  • 5. • Example: An XML doc to describe info about the POEM POEM {display: block} TITLE {display: block; font-size: 18pt; font-weight:italics} POET {display: block; margin-bottom: 10px} STANZA {display: block; margin-bottom: 10px} VERSE {display: block}
  • 6. CSS Syntax • A CSS rule has two main parts: – A selector – One or more declarations empName { display: block } • Selection of Elements – Part of the css which specifies which elements it applies to POEM {display : block} POEM is the selector • Grouping Selectors – apply same style to multiple elements • Pseudo Class – Sometimes it is required to style two elements of the same type in a different way – Example: one paragraph in italics and the other in bold – To perform this add a class attribute to one of the elements and then write a rule for the elements in the given class
  • 7. Grouping Selectors • You can group the selectors as:
  • 8. CSS ID and Class • Id selector is used to specify a style to a unique element. <Empid id=“h1”> • Class selector is used to specify a style for a group of elements. <Empname class=“c1”> <Empaddress class=“c1”>
  • 9. Style Attribute • Style attribute can be attached to the element without editing the style sheet for the document.
  翻译: