Esittely latautuu. Ole hyvä ja odota

Esittely latautuu. Ole hyvä ja odota

XML Namespaces 1 XML Namespaces provide a method to avoid element name conflicts –name conflict will occur when two different documents use the same element.

Samankaltaiset esitykset


Esitys aiheesta: "XML Namespaces 1 XML Namespaces provide a method to avoid element name conflicts –name conflict will occur when two different documents use the same element."— Esityksen transkriptio:

1 XML Namespaces 1 XML Namespaces provide a method to avoid element name conflicts –name conflict will occur when two different documents use the same element names Lähde: http://www.w3schools.com Apples Bananas African Coffee Table 80 120

2 XML Namespaces 2 XML Namespace syntax: xmlns:namespace-prefix="namespaceURI“ A Uniform Resource Identifier (URI) identifies an Internet Resource Namespace is defined in the start tag of an element. All child elements with the same prefix are associated with the same namespace. Namespace is defined both –in DTD and –in XML document Lähde: http://www.w3schools.com

3 XML Namespaces: An Example <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> My CD Collection Title Artist Lähde: http://www.w3schools.com

4 Osatehtävä 1 HTML HEAD BODY TABLE TR TH TD A IMG HENKILOTIEDOT HENKILO OSOITETIEDOT NIMITIEDOT SAHKOPOSTI WWW POSTIOSOITE Tavoite: WWW-elementti pitää muuttaa HTML-kielen A-elementiksi WWW -> A HTML-kielen elementtejä HENKILOTIEDOT-kielen elementtejä

5 Osatehtävä 1, lisäohje 1.Jotta linkki toimisi HTML-selaimessa A-elementin tulee olla XHTML-kielen nimiavaruudessa, jonka lyhenne on HTML A -> HTML:A 2.XML-jäsennin ei ymmärrä nimiavaruutta ilman xmlns:HTML attribuuttia -> www.jyu.fi 3.Jotta linkki toimisi oikeasti lisää HTML:A -elementtiin vielä href -attribuutti 4.Tee kohtien 1-3 mukainen rakennemääritys henkilotiedot2.dtd:hen

6 Entiteetit Entiteetti= ”muuttuja”, jolla määritellään oikoteitä merkkeihin ja uudelleenkäytettäviin merkkijonoihin tai dokumenttirakenteisiin Ulkoinen entiteetti = erillinen tiedosto –Parametrientiteetti (rakenne) –Yleinen entiteetti (merkkijono) Sisäinen entiteetti = dtd:ssä/XML-dokumentissa –Parametrientiteetti (rakenne) –Yleinen entiteetti (merkkijono, merkki=merkkientiteetti)


Lataa ppt "XML Namespaces 1 XML Namespaces provide a method to avoid element name conflicts –name conflict will occur when two different documents use the same element."

Samankaltaiset esitykset


Iklan oleh Google