blob: 1646044861d3f296bb8da3e455ba6092cd424578 [file] [log] [blame]
<?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">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../com.ibm.help.doc/swg_info_common.css" />
<title>Extending the content model of an XML document</title>
<script language="JavaScript">
function popup_window( url, id, width, height )
{
popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' );
popup.focus();
}
</script><script language="JavaScript" src="help/liveHelp.js"></script></head>
<body id="rextctn"><a name="rextctn"><!-- --></a>
<h1 class="topictitle1">Extending the content model of an XML document</h1>
<div><p>You can use the XML schema <samp class="codeph">any</samp> element to extend
the content model of an XML document.</p><div class="skipspace"><p>For example, you have an XML schema file called Book.xsd which
contains a complex type called BookType. BookType contains 4 elements (title,
author, year, and ISBN) and one <samp class="codeph">any</samp>element. The namespace
for the <samp class="codeph">any</samp> element is <samp class="codeph">##any</samp>. This means
that in an instance document, you can insert any XML element to extend the
definition of the BookType. </p>
<p>You can also provide a more specific
namespace. For example, you have another schema called My_Book.xsd, which
contains a complex type called My_BookType. My_BookType contains 4 elements
(title, author, year, and ISBN) and one <samp class="codeph">any</samp> element, but
in this case the namespace for the BookType element is www.wesley.com. This
means that in an instance document, you can insert any XML element to extend
the definition of the BookType, provided that they belong to the namespace
http://www.wesley.com. </p>
</div>
</div>
<div>
</div><p>
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.
</p>
</body>
</html>