organization n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Organization PowerPoint Presentation
Download Presentation
Organization

Loading in 2 Seconds...

play fullscreen
1 / 10

Organization - PowerPoint PPT Presentation


  • 64 Views
  • Uploaded on

Organization. No tutorial next week Next sheet hand in on the 05.06.07 Tuesday. <?xml version="1.0"?> <movies xmlns:xmllib="http://www.xmlmovielibrary.com"> <xmllib:title>Star Wars:Episode I-The Phantom Menace</xmllib:title> <xmllib:year>1999</xmllib:year>

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Organization' - bob


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
organization
Organization
  • No tutorial next week
  • Next sheet hand in on the 05.06.07 Tuesday
slide2

<?xml version="1.0"?>

<movies xmlns:xmllib="http://www.xmlmovielibrary.com">

<xmllib:title>Star Wars:Episode I-The Phantom Menace</xmllib:title>

<xmllib:year>1999</xmllib:year>

<purchase xmlns:xmllib="http://www.othermovielibrary.com">

<xmllib:title>Star Wars:Episode II-Attack of the Clones </xmllib:title>

<xmllib:year>2002</xmllib:year>

</purchase>

<xmllib:title>Star Wars:Episode III-Revenge of the Sith</xmllib:title>

<xmllib:year>2005</xmllib:year>

</movies>

  • The W3C Namespaces in XML Recommendation enforces some namespace constraints:
  • Prefixes beginning with the three-letter sequence x, m, and l, in any case combination, are reserved for use by XML and XML-related specifications. Although not a fatal error, it is inadvisable to bind such prefixes. The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace.
  • A prefix cannot be used unless it is declared and bound to a namespace. (Using variable in Java without declaring it)
slide4

<?xml version="1.0"?>

<bk:book xmlns:bk="tar">

<bk:title/>

</bk:book>

<?xml version="1.0"?>

<bk:book xmlns:bk="tar">

<title/>

</bk:book>

<?xml version="1.0"?>

<book xmlns="tar">

<title xmlns=“”/>

</book>

slide6

<?xml version="1.0" encoding="UTF-8"?>

<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:abc="http://abc.com/" targetNamespace="http://abc.com/" elementFormDefault="unqualified" attributeFormDefault="unqualified">

<element name="books" type="abc:t1"/>

<element name="comments" type="string"/>

<complexType name="t1">

<sequence>

<element name="book" type="abc:t2"/>

<element ref="abc:comments" minOccurs="0"/>

</sequence>

</complexType>

<complexType name="t2">

<sequence>

<element name="title" type="string"/>

</sequence>

</complexType>

</schema>

slide7

<?xml version="1.0" encoding="UTF-8"?>

<bk:books xmlns:bk="http://www.abc.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<book>

<title>XML for dummies</title>

</book>

<bk:comments>Books one the topc XML</bk:comments>

</bk:books>

Qualified:definine elements and attributes in the target namespace

Unqualified: elements and attributes in any namespace

<?xml version="1.0" encoding="UTF-8"?>

<bk:books xmlns:bk="http://www.abc.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<bk:book>

<bk:title>XML for dummies</bk:title>

</bk:book>

<bk:comments>Books one the topc XML</bk:comments>

</bk:books>

slide9

<xsd:key name="itemNumKey">

<xsd:selector xpath=".//item"/>

<xsd:field xpath="number"/>

</xsd:key>

<xsd:keyref name="itemNumKeyRef" refer="itemNumKey">

<xsd:selector xpath="products/*"/>

<xsd:field xpath="@number"/>

</xsd:keyref>

</xsd:element>

…..

unique vs key
Unique vs. Key
  • Unique = guarantees uniqueness, nullable
  • Key = guarantees uniqueness and existence
    • always be present (minOccurs must be greater than zero)
    • be non-nullable (i.e., nullable="false")
    • be unique
  • Key implies unique, but unique does not imply key