XML Namespaces Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.

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.
Transforming XML XMLNamespaces, XSLT. XML Namespaces Sometimes it is necessary to mix XML elements –Different types of content –Use of markup to convey.
Dr. Alexandra I. Cristea CS 253: Topics in Database Systems: XPath, NameSpaces.
MA foundation Creating webpages using XHTML (part 1) Simon Mahony CCH
XML Schema Heewon Lee. Contents 1. Introduction 2. Concepts 3. Example 4. Conclusion.
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.
Dr. Alexandra I. Cristea XPath and Namespaces.
Chapter 3: XML Namespaces. Chapter 3 Objectives Why you need namespaces What namespaces are, conceptually and how they solve the problem of naming clashes.
II. Basic Web Concepts.
17 Apr 2002 XML Namespaces Andy Clark. The Problem Documents use different vocabularies – Example 1: CD music collection – Example 2: online order transaction.
Introduction to RDF Based on tutorial at
Namespace in XML Transparency No. 1 Namespace in XML Cheng-Chia Chen.
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.
CIS 375—Web App Dev II SOAP.
RDF – RESOURCE DESCRIPTION FRAMEWORK Antonio Bucchiarone FBK-IRST Trento, Italy 20 Novembre 2009.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
XML: Styling and Transformation Dr Andy Evans. Multiple views Nice thing is that this data can be styled in lots of different ways using stylesheets.
SPECIAL TOPIC XML. Introducing XML XML (eXtensible Markup Language) ◦A language used to create structured documents XML vs HTML ◦XML is designed to transport.
HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
RDF Tutorial.
An Introduction to XML Based on the W3C XML Recommendations.
Chapter 3 RDF Syntax 1. Topics Basic concepts of RDF resources, properties, values, statements, triples URIs and URIrefs RDF graphs Literals and Qnames.
Lecture 13. The various node tests also work on this axis: eg node() This book has descendant-or- self nodes As expected, text nodes are included in the.
Lecture 13. The various node tests also work on this axis: eg node() This book has descendant-or- self nodes As expected, text nodes are included in the.
More XML namespaces, DTDs CS 431 – February 16, 2005 Carl Lagoze – Cornell University.
Introduction to XML This material is based heavily on the tutorial by the same name at
Tutorial 2: XML Working with Namespaces. COMBINING XML VOCABULARIES IN A COMPOUND DOCUMENT Section 2.1.
Working with Namespaces Combining XML Vocabularies in a Compound Document.
WORKING WITH NAMESPACES
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
WSDL Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
Document Type Definitions Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XPath Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
1 XML An Overview Roger Debreceny University of Hawai`i Skip White University of Delaware XBRL Workshop, August 2006.
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.
XP New Perspectives on XML, 2nd Edition Tutorial 2 1 TUTORIAL 2 WORKING WITH NAMESPACES.
XML Basics A brief introduction to XML in general 1XML Basics.
XSD Presented by Kushan Athukorala. 2 Agenda XML Namespaces XML Schema XSD Indicators XSD Data Types XSD Schema References.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
1 Tutorial 12 Working with Namespaces Combining XML Vocabularies in a Compound Document.
SAX2 and DOM2 Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML Schema (W3C) Thanks to Jussi Pohjolainen TAMK University of Applied Sciences.
1 Compound Documents: Combining XML Vocabularies.
XSD: XML Schema Language Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Interoperability How to Build a Digital Library Ian H. Witten and David Bainbridge.
Tutorial 2: XML Working with Namespaces. 2 Name Collision This figure shows two documents each with a Name element.
Unit 3 — Advanced Internet Technologies Lesson 10 — Introduction to XHTML.
Motivation Dynamically identify and understand information sources Provide interoperability between agents in a semantic manner Enable distributed extensible.
Introduction to XML Namespaces Web Engineering, SS 2007 Tomáš Pitner.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
Introduction to XML Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML Namespaces In this first lesson XML Namespaces, you will learn to:
1 Extensible Stylesheet Language (XSL) Extensible Stylesheet Language (XSL)
Beginning XML 4th Edition. Chapter 3: XML Namespaces.
The Purpose of XML Namespaces
CIS 228 The Internet 9/20/11 XHTML 1.0.
WORKING WITH NAMESPACES
XML QUESTIONS AND ANSWERS
Well-formed and Valid XML Documents
Namespace Review 21-Nov-18.
Namespace Review 29-Dec-18.
XML and Web Services (II/2546)
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Namespace Review 14-Oct-19.
XML and Web Services (II/2546)
Presentation transcript:

XML Namespaces Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University

168493: XML and Web Services (II/2546) 2 What are Namespaces? Namespaces are a simple and straightforward way to distinguish names used in XML documents, no matter where they come from [W3C Definition] An XML namespace is a collection of names, identified by a URI reference, which are used in XML documents as element types and attribute names. element typesattribute names

168493: XML and Web Services (II/2546) 3 Book Review XML

168493: XML and Web Services (II/2546) 4 Namespaces by Example In the example, the elements prefixed with xdc are associated with a namespace whose name is Those prefixed with h are associated with a namespace whose name is

168493: XML and Web Services (II/2546) 5 Prefixes Prefixes are linked to the full names using the attributes on the top element whose names begin xmlns: Prefixes are just shorthand placeholders for the full names The full names are URLs, i.e. Web addresses

168493: XML and Web Services (II/2546) 6 Why Namespaces? Book-review tags and HTML tags are all mixed up together Need to be sure that we’re finding the book titles, not the HTML page titles Can be done by processing only tags that are in the namespace

168493: XML and Web Services (II/2546) 7 Namespace Defaulting Previously, we have all those prefixes and colons cluttering up the tags We can declare a default namespace and leave out some prefixes Anything without a prefix is assumed to be in the default namespace A default namespace is considered to apply to the element where it is declared and to all elements with no prefix

168493: XML and Web Services (II/2546) 8 <html xmlns:xdc=" xmlns=" Book Review XML

168493: XML and Web Services (II/2546) 9 Namespace Defaulting (Cont.) The default namespace can be set to the empty string This has the same effect as having no default namespace Note that default namespaces do not apply directly to attributes

168493: XML and Web Services (II/2546) 10 Default Namespaces Name Huntsman …

168493: XML and Web Services (II/2546) 11 Attributes: Example 1 Is the start tag of e1 legal? Is the start tag of e2 legal?

168493: XML and Web Services (II/2546) 12 Attributes: Example 2 Is the start tag of e3 legal? Is the start tag of e4 legal?