blob: 0b7ff5ba753ca6d083f888f83385965e20dabe36 [file] [log] [blame]
kpriceef160682006-08-29 18:08:31 +00001<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html lang="en-us" xml:lang="en-us">
syeshinbefd53e2005-07-27 18:16:40 +00003<head>
kpriceef160682006-08-29 18:08:31 +00004<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
kpriceb59c9f62008-04-02 21:24:37 +00005<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
6<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
kpriceef160682006-08-29 18:08:31 +00007<meta content="public" name="security" />
8<meta content="index,follow" name="Robots" />
9<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
10<meta content="reference" name="DC.Type" />
11<meta name="DC.Title" content="Editing XML documents with multiple namespaces" />
12<meta name="abstract" content="You can use the XML schema any element to extend the content model of an XML document." />
13<meta name="description" content="You can use the XML schema any element to extend the content model of an XML document." />
14<meta content="XHTML" name="DC.Format" />
15<meta content="rextctn" name="DC.Identifier" />
16<meta content="en-us" name="DC.Language" />
17<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
syeshind0bdb8e2005-10-27 17:44:14 +000018<title>Editing XML documents with multiple namespaces</title>
syeshin66078272005-09-20 16:53:38 +000019</head>
syeshinbefd53e2005-07-27 18:16:40 +000020<body id="rextctn"><a name="rextctn"><!-- --></a>
kpriceef160682006-08-29 18:08:31 +000021
22
syeshind0bdb8e2005-10-27 17:44:14 +000023<h1 class="topictitle1">Editing XML documents with multiple namespaces</h1>
kpriceef160682006-08-29 18:08:31 +000024
25
26
syeshinbefd53e2005-07-27 18:16:40 +000027<div><p>You can use the XML schema <samp class="codeph">any</samp> element to extend
kpriceef160682006-08-29 18:08:31 +000028the content model of an XML document.</p>
29
30<div class="section"><p>For example, you have an XML schema file called Book.xsd that
syeshinbefd53e2005-07-27 18:16:40 +000031contains a complex type called BookType. BookType contains 4 elements (title,
kpriceef160682006-08-29 18:08:31 +000032author, year, and ISBN) and one <samp class="codeph">any</samp> element. The namespace
syeshinbefd53e2005-07-27 18:16:40 +000033for the <samp class="codeph">any</samp> element is <samp class="codeph">##any</samp>. This means
34that in an instance document, you can insert any XML element to extend the
syeshind0bdb8e2005-10-27 17:44:14 +000035definition of the BookType.</p>
kpriceef160682006-08-29 18:08:31 +000036<p>You can also provide a more specific namespace.
37For example, you have another schema called My_Book.xsd, which contains a
38complex type called My_BookType. My_BookType contains 4 elements (title, author,
39year, and ISBN) and one <samp class="codeph">any</samp> element, but in this case the
40namespace for the BookType element is www.wesley.com. This means that in
41an instance document, you can insert any XML element to extend the definition
42of the BookType, provided that they belong to the namespace http://www.wesley.com.</p>
syeshinbefd53e2005-07-27 18:16:40 +000043</div>
kpriceef160682006-08-29 18:08:31 +000044
syeshinbefd53e2005-07-27 18:16:40 +000045</div>
kpriceef160682006-08-29 18:08:31 +000046
47<div />
48
syeshinbefd53e2005-07-27 18:16:40 +000049</body>
50</html>