You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2003/01/16 23:54:16 UTC
cvs commit: xml-xerces/java/src/dom3/org/w3c/dom TypeInfo.java Attr.java Element.java
elena 2003/01/16 14:54:16
Modified: java/src/dom3/org/w3c/dom Attr.java Element.java
Added: java/src/dom3/org/w3c/dom TypeInfo.java
Log:
Update DOM L3 interfaces to include TypeInfo
Revision Changes Path
1.4 +6 -0 xml-xerces/java/src/dom3/org/w3c/dom/Attr.java
Index: Attr.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Attr.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Attr.java 31 Dec 2002 01:35:21 -0000 1.3
+++ Attr.java 16 Jan 2003 22:54:16 -0000 1.4
@@ -155,5 +155,11 @@
* @since DOM Level 3
*/
public boolean getIsId();
+
+ /**
+ * The type information associated with this element.
+ * @since DOM Level 3
+ */
+ public TypeInfo getSchemaTypeInfo();
}
1.5 +8 -0 xml-xerces/java/src/dom3/org/w3c/dom/Element.java
Index: Element.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Element.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Element.java 8 Jan 2003 21:42:23 -0000 1.4
+++ Element.java 16 Jan 2003 22:54:16 -0000 1.5
@@ -384,5 +384,13 @@
*/
public void setIdAttributeNS(String namespaceURI, String localName,
boolean makeId) throws DOMException;
+
+ /**
+ * The type information associated with this element.
+ * @since DOM Level 3
+ */
+ public TypeInfo getSchemaTypeInfo();
+
+
}
1.1 xml-xerces/java/src/dom3/org/w3c/dom/TypeInfo.java
Index: TypeInfo.java
===================================================================
/*
* Copyright (c) 2002 World Wide Web Consortium,
* (Massachusetts Institute of Technology, Institut National de
* Recherche en Informatique et en Automatique, Keio University). All
* Rights Reserved. This program is distributed under the W3C's Software
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
* See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
* The <code>TypeInfo</code> interface represent a type referenced from
* <code>Element</code> or <code>Attr</code> nodes, specified in the schemas
* associated with the document. The type is a pair of a namespace URI and
* name properties, and depends on the document's schema. should you be
* able to return <code>null</code> on <code>name</code>? for anonymous
* type? for undeclared elements/attributes? Can schemaType be
* <code>null</code>?
* <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], the values are computed as
* follows: If this type is referenced from an <code>Attr</code> node,
* <code>namespace</code> is <code>null</code> and <code>name</code>
* represents the [attribute type] property in the [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]. If there is no
* declaration for the attribute, <code>name</code> is <code>null</code>.
* Unlike for XML Schema, the name contain the declared type, and does not
* relate to "validity". If this type is referenced from an
* <code>Element</code> node, the <code>namespace</code> and
* <code>name</code> are <code>null</code>.
* <p>
* If the document's schema is an XML Schema [XML Schema Part 1], the
* values are computed as follows (for definitions see Post-Schema
* Validation infoset):
* <p>If the [validity] property exists AND is "invalid" or "notKnown":
* the {target namespace} and {name} properties of the declared type
* if available, otherwise null.
* <p>Note: At the time of writing, the XML Schema specification does not
* require exposing the declared type. Thus, DOM implementations
* might choose not to provide type information if validity is not valid.
* <p>If the [validity] property exists and is "valid" the name and namespace
* computed as follows:
* <p>a) If [member type definition] exists, then expose the
* {target namespace} and {name} properties of the
* [member type definition] property;
* <p>b) If the [member type definition namespace] and the
* [member type definition name] exist, then expose these properties.
* <p>c) If the [type definition] property exists, then expose the {target
* namespace} and {name} properties of the [type definition] property;
* <p>d) If the [type definition namespace] and the [type definition name]
* exist, then expose these properties.
*
* <p> Note: At the time of writing, the XML Schema specification does not
* define how to expose annonimous types. If future specifications
* define how to expose annonimous types, DOM implementations can expose
* annonimous types via "name" and "namespace" parameters.
*
* Other schema languages are outside the scope of the
* W3C and therefore should define how to represent their type systems using
* <code>TypeInfo</code>.
* <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface TypeInfo {
/**
* The name of a type declared for the associated element or attribute,
* or <code>null</code> if unknown. Implementations may also use
* <code>null</code> to represent XML Schema anonymous types. "name"
* seems too generic and may conflict. shoud we rename it?
*/
public String getTypeName();
/**
* The namespace of the type declared for the associated element or
* attribute or <code>null</code> if the element does not have
* declaration or if no namespace information is available.
* Implementations may also use <code>null</code> to represent XML
* Schema anonymous types. "namespace" seems too generic and may
* conflict. shoud we rename it?
*/
public String getTypeNamespace();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org