{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture9

lecture9 - PIC 40A Lecture 9 XML Namespaces and XML Schemas...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PIC 40A Lecture 9: XML Namespaces and XML Schemas A Problem with Extensibility • The extensibility of XML (ability to create custom elements) can lead to naming collisions (using different elements in an XML document that have the same name). Eg Two different date elements < date >October 15, 2008</ date > < date >Dinner and Movie</ date > Solution: XML Namespaces • A n XML namespace is a uniquely identifiable collection of element and attribute names • Using XML namespaces can resolve naming collisions. Eg < cal:date >October 15,2008</ cal:date > < act:date >Dinner and Movie</ act:date > The prefixes cal and act specify which namespace the date element belongs to. Who creates namespaces? • The XML application author creates namespaces by prefixing element names <!ELEMENT song ( xhtml:ul )> <!ELEMENT xhtml:ul ( xhtml:li , xhtml:li , xhtml:li , xhtml:li )> <!ELEMENT xhtml:li (title|artist)> <!ELEMENT title (#PCDATA)> <!ELEMENT artist (#PCDATA)> This helps avoid collisions between predefined elements and user-defined elements. Specifying namespaces • The XML document author specifies an XML...
View Full Document

  • Winter '10
  • OUELLETTE
  • Uniform Resource Identifier, XML Schema, Uniform Resource Locator, Document Type Definition, root element xsd

{[ snackBarMessage ]}

Page1 / 13

lecture9 - PIC 40A Lecture 9 XML Namespaces and XML Schemas...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online