1 / 14

XML

XML. What is XML?. "eXtensible Markup Language" New development in web creation Overcomes limitations of HTML small number of tags limited features several versions of the language XML allows you to create your own tags Separates content from presentation. SGML, HTML and XML. SGML

shaina
Download Presentation

XML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML

  2. What is XML? • "eXtensible Markup Language" • New development in web creation • Overcomes limitations of HTML • small number of tags • limited features • several versions of the language • XML allows you to create your own tags • Separates content from presentation

  3. SGML, HTML and XML • SGML • Standard Generalised Markup Language • ISO standard since 1986 • complex but widely used "meta-language" • HTML • created using SGML for web delivery • XML • a simplified version of SGML for users to create their own 'markup language' • not just a new version of HTML, a different concept

  4. Creating XML Processing instruction • <?xml version="1.0"?> • <library> • <book> • <author> • <firstname>Bill</firstname> • <lastname>Bryson</lastname> • </author> • <booktitle>Notes From a Small Island</booktitle> • <publisher>Transworld</publisher> • </book> • </library> Tags - "elements"

  5. More XML Markup • Empty elements <curtainup/> • Attributes <book section="short loan"> • Special characters &lt; &#8478; • Comments<!--some text--> • Data sections • <![CDATA[ • *a = &b; • c = (d<=3); • ]]>

  6. Using Style with XML • Cascading Style Sheets (CSS) for simple web presentation • booktitle { • margin-left: 10%; • font-weight: bold; • } • Present in multiple formats - print, audio... • XSL eXtensible Style Language • Transformations of XML • e.g. reorder elements

  7. XSL Transformations XSL commands • <H1> • <xsl:for-each select="library/book" • order-by="author/lastname"> • <xsl:value-of select="author/lastname"/> • </xsl:for-each> • </H1> XML elements HTML template for formatting

  8. Uses of XML • Creating web pages - better structure • Improved indexing and searching • www.goxml.com/ • www.w3.org/XML/ • Simple "database" functionality - organising and manipulating data "fields" within the page • Configuring/manipulating information at client - presenting information in different ways to different users • "E-business" - business to business transactions, passing of tailored information e.g. inventory, ordering etc

  9. Linking Developments • XLink • Multiple destinations for a link • Different presentations of a linked resource • replace existing page with new (as now) • embedded in existing page • display in new window • XPointer • Replaces internal anchor • Jump to any XML element within document

  10. XHTML: HTML in XML • Preparing HTML for use in XML browsers • HTML defined in XML • Must close all tags <p> </p> or <p/> • Tags in lower case • Quote attribute values src="logo.gif" • validate/correct documents www.w3.org/People/Raggett/tidy

  11. Browser Compatibility • Support for XML and CSS in common browsers: • Netscape 4 - no XML, moderate CSS • IE4 - partial XML, reasonable CSS • IE5 - good XML and CSS • XML viewers available (special browers or plug-ins) • Server can change XML to HTML before delivery

  12. XML Applications • XML is well established in some areas e.g. MathML (Mathematics Markup Language) • <expr> • <mci>x</mci> • <power/> • <mcn>2</mcn> • </expr> • <plus/> • <mcn>4</mcn> x2+4

  13. XML Applications • MathML (Mathematics Markup Language) www.w3.org/TR/REC-MathML • CML (Chemical Markup Language) www.venus.co.uk/omf/cml/ • RDF (Resource Description Framework) • www.w3.org/RDF/ • SMIL (Synchronised Multimedia Integration Language) www.w3.org/TR/1998/PR-smil-19980409/ • MusicML • www.tcf.nl/trends/trends6-en.html • CFML (Cold Fusion, for database integration) • www.allaire.com/documents/cf45docs/acrobatdocs/45refcard.pdf

  14. References • W3Cs XML HomePage • www.w3.org/XML/ • XML Homepage • www.xml.com • XML FAQ • www.ucc.ie/xml • Ariadne web articles • www.ariadne.ac.uk/issue16/what-is/

More Related