Namespace Review 14-Oct-19.

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 5-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
17 Apr 2002 XML Namespaces Andy Clark. The Problem Documents use different vocabularies – Example 1: CD music collection – Example 2: online order transaction.
XML Namespaces Each schema file associated with a URL to uniquely identify where elements come from – Like packages in Java
1 RDF Tutorial. C. Abela RDF Tutorial2 What is RDF? RDF stands for Resource Description Framework It is used for describing resources on the web Makes.
XML Namespaces Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
A Simple Schema Design. First Schema Design Being a Dog Is a Full-Time Job Charles M. Schulz Snoopy Peppermint Patty extroverted beagle Peppermint.
Introduction to XLink Transparency No. 1 XML Information Set W3C Recommendation 24 October 2001 (1stEdition) 4 February 2004 (2ndEdition) Cheng-Chia Chen.
More XML namespaces, DTDs CS 431 – February 16, 2005 Carl Lagoze – Cornell University.
XML Namespaces Andrey Smirnov CSCI 7818 September 21, 2000.
26-Jun-15 XML. 2 HTML and XML, I XML stands for eXtensible Markup Language HTML is used to mark up text so it can be displayed to users XML is used to.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
XML Verification Well-formed XML document  conforms to basic XML syntax  contains only built-in character entities Validated XML document  conforms.
XP New Perspectives on XML, 2nd Edition Tutorial 2 1 TUTORIAL 2 WORKING WITH NAMESPACES.
Unit 4 – XML Schema XML - Level I Basic.
1 understanding xml namespaces. 2 understanding namespaces Namespaces are the source of much confusion in XML, especially for those new to the technology.
Working with Namespaces Combining XML Vocabularies in a Compound Document.
XML 2nd EDITION Tutorial 2 Working With Namespaces.
WORKING WITH NAMESPACES
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
 2002 Prentice Hall, Inc. All rights reserved. 1 Chapter 7 – Schemas Outline 7.1Introduction 7.2Schemas vs. DTDs 7.3Microsoft XML Schema: Describing Elements.
Introduction to XML. What is XML? Extensible Markup Language XML Easier-to-use subset of SGML (Standard Generalized Markup Language) XML is a.
Cornell CS 502 More XML XHTML, namespaces, DTDs CS 502 – Carl Lagoze – Cornell University.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
Organization No tutorial next week Next sheet hand in on the Tuesday.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections.
An OO schema language for XML SOX W3C Note 30 July 1999.
More XML namespaces, DTDs CS 431 – Carl Lagoze – Cornell University.
XP New Perspectives on XML, 2nd Edition Tutorial 2 1 TUTORIAL 2 WORKING WITH NAMESPACES.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
1 Tutorial 12 Working with Namespaces Combining XML Vocabularies in a Compound Document.
3 XML Namespaces XML Namespaces Order No Dear Dr. Smith, we confirm your order of the book 1The XML Handbook ISBN: Price: USD.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2.
Working with XML Schemas ©NIITeXtensible Markup Language/Lesson 3/Slide 1 of 36 Objectives In this lesson, you will learn to: * Declare attributes in an.
19-Dec-15 XML 2 HTML and XML, I XML stands for eXtensible Markup Language HTML is used to mark up text so it can be displayed to users XML is used to.
1 Compound Documents: Combining XML Vocabularies.
XP Tutorial 9New Perspectives on HTML and XHTML, Comprehensive 1 Working with XHTML Creating a Well-Formed Valid Document Tutorial 9.
Tutorial 2: XML Working with Namespaces. 2 Name Collision This figure shows two documents each with a Name element.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Representing Web Data:
CHAPTER NINE Accessing Data Using XML. McGraw Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Introduction The eXtensible.
XML Namespaces In this first lesson XML Namespaces, you will learn to:
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
CITA 330 Section 4 XML Schema. XML Schema (XSD) An alternative industry standard for defining XML dialects More expressive than DTD Using XML syntax Promoting.
Beginning XML 4th Edition. Chapter 3: XML Namespaces.
The Purpose of XML Namespaces
Unit 4 Representing Web Data: XML
Extensible Markup Language XML
WORKING WITH NAMESPACES
XML QUESTIONS AND ANSWERS
eXtensible Markup Language
XAML User Interface Creation in C#
Introduction to XML Mr. Majed Bouchahma
XML Technologies and Related Applications
Session III Chapter 6 – Creating DTDs
Chapter 7 Representing Web Data: XML
Namespace Review 21-Nov-18.
Namespaces.
ece 720 intelligent web: ontology and beyond
Introduction to XML Mr. Majed Bouchahma
Namespace Review 29-Dec-18.
eXtensible Markup Language
Working with Namespaces and Schemas
Ensuring Name Uniqueness
Session II Chapter 6 – Creating DTDs
New Perspectives on XML
Presentation transcript:

Namespace Review 14-Oct-19

Namespaces An XML document may reference more than one schema A Namespace specifies which schema defines a given tag XML, like Java, uses qualified names This helps to avoid collisions between names Java: myObject.myVariable XML: myDTD:myTag Note that XML uses a colon (:) rather than a dot (.) If an XML processor is not namespace-aware, the colon is just part of the name

Namespaces and URIs A namespace is defined as a unique string To guarantee uniqueness, typically a URI (Uniform Resource Indicator) is used, because the author “owns” the domain It doesn't have to be a “real” URI; it just has to be a unique string Example: http://www.matuszek.org/ns There are two ways to use namespaces: Declare a default namespace Associate a prefix with a namespace, then use the prefix in the XML to refer to the namespace 3

Namespace syntax In any start tag you can use the reserved attribute name xmlns: <book xmlns="http://www.matuszek.org/ns"> This namespace will be used as the default for all elements up to the corresponding end tag You can override it with a specific prefix You can use almost this same form to declare a prefix: <book xmlns:dave="http://www.matuszek.org/ns"> Use this prefix on every tag and attribute you want to use from this namespace, including end tags--it is not a default prefix <dave:chapter dave:number="1">To Begin</dave:chapter> You can use the prefix in the start tag in which it is defined: <dave:book xmlns:dave="http://www.matuszek.org/ns"> 4

The End