From stele at fxtech.com Sat Jan 1 17:49:08 2000
From: stele at fxtech.com (Paul Miller)
Date: Mon Jun 7 17:18:57 2004
Subject: ANNOUNCE: XMLIO 0.5 with C and C++ implementation
Message-ID: <386E3E58.7978F758@fxtech.com>
XMLIO is my lightweight library for generating and processing SML/XML
streams in C or C++ applications where application data structures or
configuration settings are stored as XML syntax.
The latest version is completely rewritten in C, with the C++ API
layered over that (but using exceptions, references, and in the XML::
namespace). The XML input processor (XML_Input and XML::Input) is a
hybrid push/pull model where specific element handlers are specified for
each level of a nested object hierarchy. When a desired element is
encounted, a callback handler is called (like with a push model), but it
is up to the handler to pull what it needs (either data or more
subelements). If nothing is requested, the entire element is skipped.
Because element processing is performed on the stack and unused elements
are thrown away immediately, there is no memory overhead during
processing, making it extremely efficient.
Intrinsic data types (including ints, floats, doubles, booleans,
strings, and list enums) corresponding to object member data can
automatically be processed and stored at the correct address in the
object. Custom processors can be easily written to handle custom element
data.
Here is an example on how to process the following XML syntax into some
sample objects:
(100,100)
50
typedef struct Point_
{
int x, y;
} Point;
XML_Error Read_Point(XML_Element *elem, Point *p)
{
XML_Char data[40];
size_t len = sizeof(data) / sizeof(XML_Char);
XML_Error error = XML_ElementReadData(elem, data, &len);
data[len] = 0;
if (sscanf(data, "(%dx%d)", &p->x, &p->y) != 2)
return XML_Error_InvalidValue;
return error;
}
typedef struct Circle_
{
Point center;
int radius;
} Circle;
XML_Error Read_Circle(XML_Element *elem, Circle *circle)
{
const XML_Handler handlers[] = {
XML_ELEMENT_HANDLER_MEMBER("Center", Read_Point, Circle,
center),
XML_INT_HANDLER("Radius", Circle, radius),
XML_HANDLER_END
};
return XML_ElementProcess(elem, handlers, circle);
}
Please see the README at http://www.fxtech.com/xmlio for complete
details.
--
Paul Miller - stele@fxtech.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From stefan.haustein at trantor.de Sun Jan 2 02:17:13 2000
From: stefan.haustein at trantor.de (Stefan Haustein)
Date: Mon Jun 7 17:18:57 2004
Subject: SAX2 Namespace Support
References: <14430.46481.974707.922192@localhost.localdomain>
<012701bf4b44$0c68b030$4a5eedc1@arp01>
<14430.55483.433692.943811@localhost.localdomain>
<385FA4C9.2B054683@pacbell.net> <14442.32320.722924.870701@localhost.localdomain>
Message-ID: <386EB446.9438F25B@trantor.de>
David Megginson wrote:
>
> public class NamespaceHandler
> {
> public void startElement (String namespaceURI, String localName,
> NSAttributeList atts)
> throws Whatever;
In order to support the "old" AttributeList.getValue (String name),
AttributeList needs to be aware of the element's namespace. If
getElementNamespace () is added to AttributeList, we are not that far
from also adding getElementPrefix () and getElementLocalName () to
AttributeList. With these methods in AttributeList (and some additional
attr-namespace supp methods, the DocumentHandler interface could be
public void startElement (String prefixedName, AttributeList attrs);
(etc.)
...and SAX2 would have full namespace support and also be nearly fully
compatible to SAX1 (Ok, not for implementors of AttributeList, but who
does that except from parser writers?)
Ok, in fact, AttributeList would become a kind of "startElementEvent". I
am not sure if I realy like this suggestion myself, because
AttributeList would be more than the name suggests. But it provides
compability and full namespace support at once without registering two
different handlers...
Best regards,
Stefan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Sun Jan 2 03:08:56 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:18:57 2004
Subject: XML Schema Question
Message-ID: <386EC1AB.F257F96E@algx.net>
All-
I'm trying to get my head around the latest revision (12-17-99) of the
XML Schema spec, as it changes quite a bit from previous versions. If
someone could let me know if I'm on track, or what I'm missing, I'd
appreciate it.
My understanding is for XML like this:
Some content
the myNamespace namespace is of course associated with
http://someUrl.com. And the schema for the document that would be used
for validation would be Schema/mySchema.xsd, as defined in the default
namespace. Is that correct? I know that was the previous version...
And in my schema (here's where everything changed):
That would be right, as I can tell. My only unsurety is whether it is
correct to omit the namespace before each element's name (in a DTD, of
course, this has to be myNamespace:element1 and myNamespace:element2).
As far as I can tell, the element is defined, and the namespace listed
in targetNamespace is then applied to all elements named. That would be
why the type element1Type must be referred to as
myNamespace:element1Type in the definition of the element1 element,
correct? The namespace is applied to it. So can someone let me know if
I am reading this right, or if I'm off in left field somewhere ;-)
Thanks,
Brett
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dessert at mindspring.com Sun Jan 2 06:18:07 2000
From: dessert at mindspring.com (FormatData)
Date: Mon Jun 7 17:18:57 2004
Subject: ANN: DESSERT - A DTD for Recipes
Message-ID: <000001bf54e9$111894c0$bb49f7a5@ms447998>
FormatData (http://www.formatdata.com) announces:
The Document Encoding and Structuring Specification for Electronic Recipe
Transfer
(DESSERT) version 0.2
DESSERT is an XML schema for the rich representation of recipe documents.
About two years ago we saw the need for a standard way for users to retrieve
recipes from the Web. About that time, XML came into being -- it was
obvious that XML would be the basis for this format.
DESSERT has grown into a format that allows from very simple to very
detailed markup of recipes and menus (a menu is group of recipes, as for a
multi-course meal). It is simple enough for the posting of basic recipes by
amateurs, and rich enough to satisfy the needs of traditional print
publishers. The separation of content and style is stressed in the design
of DESSERT -- there are no appearance-specific tags, yet there are many
"hooks" to act as stylesheet language selectors.
FormatData is looking to the XML community for review and comments on the
DESSERT DTD in it's current form. Any and all experience the community has
to bring to bear on this fledgling project would be helpful. FormatData
plans to submit DESSERT to a body such as XML.ORG for exposure to the wider
recipe publishing community where it can be developed further.
Right now, having others check the DTD against various XML processing
environments for validation of the code would be valuable. You can D/L the
DTD from ftp://ftp.mindspring.com/users/jsaiya
Editing software and viewers are in the works.
----------
Jim Saiya
FormatData
mailto:dessert@formatdata.com tel:+1 (703) 582-9072
http://www.formatdata.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From costello at mitre.org Sun Jan 2 12:56:29 2000
From: costello at mitre.org (Roger Costello)
Date: Mon Jun 7 17:18:57 2004
Subject: null vs empty in XML Schemas
References: <33D189919E89D311814C00805F1991F7F4AAF5@RED-MSG-08> <386CA878.67743310@mitre.org>
Message-ID: <386F4B76.106883C7@mitre.org>
Hi Folks,
I have two questions:
1. What is the difference between null and empty?
2. How is nullable/null used?
My understanding of the difference between null and empty is:
- If an element is declared to be of type empty then in the XML instance
document the content of that element is a string of length zero.
- If an element is declared with nullable="true" then in the XML
instance
document if the element has xsi:null="true" then this element
has undefined content.
Is this a correct understanding of the difference between empty and
null?
Below is my understanding of how nullable/null is to be used:
Here is an example XML Schema snippet declaring an element (middle) with
nullable="true":
Here is an example XML instance document conforming to the above schema
snippet, where the middle element has been set to a null value:
John
Doe
Thus, middle may contain a NMTOKEN value, or it may indicate that there
is no defined value. Is this the correct usage of nullable/null? My
reason for asking is because in the XML Schema spec, after nullable/null
is discussed there is an Issue section stating:
"Issue (nullRequiresEmpty): Is it a precondition for being nullable that
the element's contentType allow no content? If not, then more needs to
be said above, if so, this needs to be spelled out."
This isn't consistent with the above example. I thought that an element
declared with nullable="true" can have a value in the instance document
when a value is available. When no value is available then we can
indicate this in the instance document by setting xsi:null="true". This
Issue seems to say that elements declared with nullabe="true" can never
have a value in the instance document. Thus, the middle element can
never have a value. Wherein lies the truth? /Roger
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Sun Jan 2 17:15:56 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:57 2004
Subject: SAX2: Features and Properties
References: <14432.61502.356079.908984@localhost.localdomain>
Message-ID: <386F87CD.7753F836@pacbell.net>
David Megginson wrote:
>
> http://xml.org/sax/properties/dom-node
> Read-only. Valid only during a callback (null otherwise).
> The DOM node currently being visited if SAX is being used as a DOM
> iterator and is visiting a DOM node.
Having this be read-only means that there's no portable way
to use this "dom iterator" facility, since there's no way to
feed initial the DOM node to it!!
A simple fix: it's readonly inside a parse() invocation, and
is writable otherwise.
Not fixing this means that such iterators must be nonportable;
which should IMHO be an anti-goal.
- Dave
p.s. This issue was raised in the initial discussions.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Sun Jan 2 18:48:30 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:57 2004
Subject: SAX2 Namespace Support
References: <14430.46481.974707.922192@localhost.localdomain>
<012701bf4b44$0c68b030$4a5eedc1@arp01>
<14430.55483.433692.943811@localhost.localdomain>
<385FA4C9.2B054683@pacbell.net> <14442.32320.722924.870701@localhost.localdomain>
Message-ID: <386F9D83.326CB9@pacbell.net>
David Megginson wrote:
>
> David Brownell writes:
>
> > There's been way too much email on this topic -- I should have
> > weighed in earlier. In all honesty I'd prefer to see all namespace
> > support be cleanly layered on top of SAX1. It's easy to do it that
> > way; just add some optional code to postprocess a SAX event stream.
>
> The argument against that is efficiency: I have found that even the
> most efficient Namespace post-processor that I can write adds about
> 25% to parsing time. The reason, I think, is that there is a high
> cost to iterating through every attribute list and examining every
> attribute name, and copying or wrapping the attribute lists to give a
> Namespace view.
Ah -- but what was that post-processor trying to do, then?
I once did a pretty quick'n'dirty one that cost barely 10% even though
it used DOM data structures (which, for attribute lists and values, are
often grossly inefficient). I've every reason to believe it could be
done with much lower cost. Perhaps your 25% was doing more work than
was required.
Then there's also the approach of having the processing be integrated
with the next layer, which already needs to iterate and examine. (And
with different goals than a parser!) Such approaches can reduce the
cost much further -- effectively, to zero.
> > With respect to this particular proposal, I have several comments.
> >
> > First, it's unclear to me what's happened to our old friend, the
> > org.xml.sax.DocumentHandler.startElement callback:
> >
> > public void startElement (String name, AttributeList attrs)
> > throws SAXException;
> >
> > If that call is gone, I anticipate migration problems to SAX2.
>
> There have been so many proposals that I'm starting to lose track.
> The idea, I think, is that this would be replaced ...
Raising that point about compatibility. There's not been much of
discussion abou the fairly substantial change you're proposing,
that SAX1 and SAX2 seemingly be incompatible at this basic level.
It's only come out implicitly in reaction to other points.
> > If it's still there, then it must be the application's choice to use
> > the new sax2.DocumentHandler interface or the original ... presumably
> > it would use Configurable.setProperty() with some ID for the new
> > namespace-aware sax2.DocumehtHandler to identiy its choice.
>
> One option that no one has suggested yet is to create the
> NamespaceHandler a little differently:
>
> public class NamespaceHandler
> {
> public void startElement (String namespaceURI, String localName,
> NSAttributeList atts)
> throws Whatever;
>
> [ deletia ]
> }
>
> That way, SAX parsers could still use the original DocumentHandler to
> report the XML 1.0 view (with prefixed names), and the
> NamespaceHandler to report the Namespace view of elements and
> attributes, which is the only place the view differs.
>
> [ deletia ]
>
> Personally, I find this approach a little brittle ...
I'd thought about that approach too. I couldn't quite put a finger
on why it bothered me, beyond making adding extra calls which would
surely cause some application trouble someday.
> > Second, it's unclear how to report violations of namespace conformance.
>
> [ deletia ]
>
> > That is, faced with this document
> >
> >
> > Hello again! :-)
> >
> >
> > Two reporting issues arise: (a) How does one know that namespaces are
> > to be used at all? It's a legal XML 1.0 document, so inherently there
> > is no error.
>
> That's a big problem. My SAX2 proposal is for XML+Namespaces by
> default, but it's possible to try to disable Namespace support. That
> means that, by default, you would get an error for this document.
Apart from that "try to", I like that approach.
I've been leaning in various cases to "XML+namespaces" as a default,
but think it _must_ be possible to do more than "try" to disable it.
Namespaces are not mandatory (not part of the XML spec) and by now
it's well known they're not trouble-free. SAX2 shouldn't preclude
systems that choose not to use namespaces.
> > (b) If one knows that namespaces are to be used, is the undeclared
> > "html" prefix to generate a warning, recoverable error, or fatal
> > error through sax.ErrorHandler? Is it reported some other way?
>
> I think that it would be wrong to use fatalError to report Namespace
> violations, but others may disagree.
And given the W3C's original actions, I believe some of them are at W3C.
(Else they'd have made this explicit in the namespace specification, when
the issue came up in review comments.)
> > I think that using ErrorHandler.error() is the best solution, but then
> > that leads to the issue of how to report namespace URIs that aren't
> > available. (And as I recall, there were more errors to deal with than
> > just unresolved namespace prefixes.)
>
> Error numbers would be helpful, if someone were willing to invent some.
I'll start your collection by proposing SAXParseException get a bunch of
integer literal constants. All undefined constants would be available for
use by revisions of SAX, but these numbers increment from zero (so folk
wanting proprietary codes have some sand to stand on for a while).
/** Error, details unspecified (default for SAX1) */
final static const int SAX_ERR_UNSPECIFIED = 0;
/** Namespace prefix was undeclared. The undeclared prefix is
* in a String member of the exception (access TBD). */
final static const int SAX_ERR_NAMESPACE_PREFIX_UNECLARED = 1;
Folk wanting to follow up -- please change the title to "SAX2 error numbers"!
I'll anticipate three general categories of followup: about the framework
(e.g. proprietary codes), about the errors (more than two will arrive :-),
about access to error-specific detail info, about how I can't count, and
finally about things I didn't anticipate.
Once the basic framework is settled, I'll scan my enhanced AElfred (and a
layered validator) to come up with more error codes.
> > > This would never be enabled by default, but for the relatively small
> > > class of apps that needed to know the original prefix, the prefix
> > > would be available simply by splitting the name argument.
> >
> > Clearly that class includes "DOM-using applications", which for better
> > or worse (opinions do vary :-) isn't a small class.
> >
> > DOM L2 applications explicitly have the same option that I noted above:
> > use (or non-use) of namespace information is the choice of the application,
> > not the choice of some version of an XML infrastructure.
>
> Is DOM2 more explicit about processing than DOM1, then? There's
> nothing in DOM1 that says (for example) that you have to include
> comments and other stuff from the original XML document, if in fact
> there is an original XML document.
DOM L2 still doesn't say any more than DOM L1 did about the association
between a given XML document (comments, entity refs, DTD, etc) and a
given DOM tree ... and it's APIs are still incomplete for parsing into
a "full" DOM tree without using proprietary API extensions. Sigh.
For the record, I've updated my "DOM2" implementation's javadoc to
explicitly discourage applications from using the following features:
CDATASection, DocumentType, Entity, EntityReference, Notation, and
the fact that attribute nodes can have children. (The "DOM Functionality
to Avoid" section in the package javadoc provides more info.)
That list doesn't include comments. Comments may be unwise, and not
all parsers can report them, but their functionality is at least
complete within the scope of DOM, and ignoring them is trivial.
> Even in DOM2, I wonder if you'd have to have the *original* prefixes
> or just some prefixes? After all, the DOM won't always be built from
> an XML document; it might be a wrapper around a bunch of DB tables
> (for example) where there are no original prefixes available.
Prefixes are settable, for namespace-aware nodes. As we all know,
such prefixes _should_ be used only for output. After massaging a
document (perhaps built from multiple databases or B2B partners)
some pre-output processing stage needs to massage the tree to ensure
that all namespace prefixes get declared.
As for "original", the intent is that prefixes that start out with
some human-meaningful connotation ("xsl:template" vs "a82mfx:template")
preserve it, but that's clearly up to the application. Apps can do
whatever output mangling they choose, including removing almost all
whitespace to make the document completely unintelligible. Neither
of those are good things to do, or IMHO to encourage.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Sun Jan 2 18:32:32 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:18:57 2004
Subject: XML Schema Question
In-Reply-To: Brett McLaughlin's message of "Sat, 01 Jan 2000 21:10:35 -0600"
References: <386EC1AB.F257F96E@algx.net>
Message-ID:
Brett McLaughlin writes:
> My understanding is for XML like this:
>
>
>
> xmlns:myNamespace="http://someUrl.com"
> >
>
>
>
>
>
> Some content
>
>
>
> the myNamespace namespace is of course associated with
> http://someUrl.com. And the schema for the document that would be used
> for validation would be Schema/mySchema.xsd, as defined in the default
> namespace. Is that correct? I know that was the previous version...
This is not quite the right approach. The default namespace
declaration is doing no work, and is unlikely to yield the right
results.
The preferred approach is as follows:
The following would also work, in a context where dereferencing
namespace URIs is mandated/encouraged.
but would require that you use your schema URL as your namespace URI.
> And in my schema (here's where everything changed):
>
>
> PUBLIC
> "-//W3C//DTD XML Schema Version 1.0//EN"
> SYSTEM
> "http://www.w3.org/TR/1999/WD-xmlschema-1-19991217/structures.dtd"
> >
>
> xmlns="http://www.w3.org/1999/XMLSchema"
> xmlns:myNamespace="http://someUrl.com"
> >
>
>
>
>
>
>
>
>
>
>
>
>
>
> That would be right, as I can tell. My only unsurety is whether it is
> correct to omit the namespace before each element's name (in a DTD, of
> course, this has to be myNamespace:element1 and myNamespace:element2).
> As far as I can tell, the element is defined, and the namespace listed
> in targetNamespace is then applied to all elements named. That would be
> why the type element1Type must be referred to as
> myNamespace:element1Type in the definition of the element1 element,
> correct? The namespace is applied to it. So can someone let me know if
> I am reading this right, or if I'm off in left field somewhere ;-)
The schema is all correct, and your analysis of the namespace story in
the schema is correct (see also my message on this subject yesterday [1]).
ht
[1] http://www.lists.ic.ac.uk/hypermail/xml-dev/xml-dev-Jan-2000/0013.html
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Sun Jan 2 19:02:36 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:57 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <199912262051.NAA02771@localhost.localdomain>
<14440.52595.283247.36221@localhost.localdomain>
Message-ID: <386FA0D2.6845B6F0@pacbell.net>
David Megginson wrote:
>
> Clark C. Evans writes:
>
> > On Sun, 26 Dec 1999 uche.ogbuji@fourthought.com wrote:
> > >
> > > {"http://www.w3.org/1999/xhtml", "a", ""} ==
> > > {"http://www.w3.org/1999/xhtml", "a", "html"}.
> >
> > {"","a",""} != {"","a","html"}
>
> As I understood it, the suggestion was that
>
> {"", "a", ""} == {"", "a", "html"}
Actually I think the namespace spec defines
{ undeclared, "a", valid-prefix }
as "namespace-nonconformant", AKA some kind of error which they
neglected to describe well enough to support portable APIs.
Meaning that any application choosing to use such a "Name"
class (which IMHO is a fine notion) needs to treat this value
with care ... IEEE floating point math has a variety of sorts
of "NaN" values, perhaps useful models can be found there.
I'd suggest that most "==" tests against such a Name ought to
fail, and ordering tests should cause exceptions.
The issue came up on another namespace thread.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Sun Jan 2 22:33:21 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:57 2004
Subject: SAX2: Should SAXException extend IOException?
References:
Message-ID: <386FD22D.765781EE@pacbell.net>
David Megginson wrote:
>
> Rajiv Mordani writes:
>
> > java.util.zip.ZipException deriving from IOException is
> > appropriate. It is related to i/o so it makes sense to have that.
Also, the only place it's documented to be thrown is in a constructor
which also throws IOException. I expect the documentation is missing
a fair number of uses though -- which often happens when an exception
inherits from another one.
> I'd be interested in a clear statement of the criteria for this
> distinction
I doubt you'll get such a clear statement. Organizational politics
have come in, as well as sloppiness on the part of some developers.
That's not just at Sun; many organizations get that way for any
particular category of design decision you can identify.
I'll just say that questions get asked if an exception has strange
inheritance, which can permit it to masquerade as something it isn't,
and defining new categories of RuntimeException is really perceived
as undesirable. Increasingly, those questions need good answers if
such exceptions are expected to become parts of public APIs.
> -- you get a ZipException, presumably, because of an error
> in the format of the zip file you're reading from;
Curious example. java.util.zip.DataFormatException is what I'd
expect to get when faced with bad ZIP data. (Recalling some of
the chaos involved in seeing JDK 1.1 get ZIP/JAR support, it's
no surprise that its exception architecture seems pretty odd.)
That's not an IOException.
> you get a
> SAXException because of an error in the format of the XML file you're
> reading from.
Looking at the JDK 1.2 javadocs, I also see these data format style
exceptions, which don't derive from IOException:
java.security.certificate.CertificateEncodingException
java.security.certificate.CertificateParsingException
java.text.ParseException
java.lang.NumberFormatException
java.awt.image.RasterFormatException
org.omg.CORBA. ... several ...
As with XML format errors, higher layers won't usually see those;
they get morphed by intermediate layers into diagnostics that are
more task-relevant. (A few of those are RuntimeExceptions though.)
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Sun Jan 2 23:39:06 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:57 2004
Subject: SAX2: Should SAXException extend IOException?
References: <14432.57765.516268.430263@localhost.localdomain>
<14433.8570.811500.337122@localhost.localdomain>
Message-ID: <386FE197.CB4FC03C@pacbell.net>
David Megginson wrote:
>
> I especially like the idea that higher-level libraries could have
>
> void importXML (String uri) throws IOException;
>
> without the application's having any direct dependency on SAX
> interfaces.
That's possible regardless of the inheritance of SAXException,
so that can't be your real motivation.
> It could accomplish the same thing by having a
> SAXExceptionAdapter that embeds the SAXException and extends
> IOException, but that seems like a lot of unnecessary fuss for a very
> common case.
Is that the motivation? In my work, such cases aren't common. I need
all basic classes of fault to get different handling paths, and it's
never been a problem to have a "throws SAXException" be one of them (or
to map all the underlying faults to some more task-appropriate reporting
models, perhaps not involving exceptions at all).
Likewise, I've always found code like
try {
...
} catch (MostDerivedException e) {
// this has to go FIRST !!!
...
} catch (LessDerivedException e) {
// don't put this after LeastDerivedException
...
} catch (LeastDerivedException e) {
// careful -- this has lots of subclasses
...
} catch (... other cases ...) {
...
}
to be error prone. Often some try/catch gets written and omits critical
cases, and testing won't turn them up until a release or two is fielded
(and then it's often expensive to find and fix the problems). Far better
to use the language's strong typing facility to have the compiler make sure
all cases are handled from day one, by not having those exceptions inherit.
- Dave
> Opinions?
>
> All the best,
>
> David
>
> --
> David Megginson david@megginson.com
> http://www.megginson.com/
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From vita96 at se.its-sby.edu Mon Jan 3 04:39:38 2000
From: vita96 at se.its-sby.edu (Vita Prihatoni)
Date: Mon Jun 7 17:18:58 2004
Subject: Happy Millenium...
Message-ID:
Hi, folks.
Happy millenium to you all. I think Millenium bug is an
euphoria, isn't it ?!
Vita Prihatoni Purnomo
---------------------------------
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From sbrown at saonet.ucla.edu Mon Jan 3 05:49:13 2000
From: sbrown at saonet.ucla.edu (Brown, Sam)
Date: Mon Jun 7 17:18:58 2004
Subject: XML digital signatures
Message-ID: <1EF0C92BCCDAD2118FD40020480E269B01B0B38B@10EEXCHANGE>
I'm wondering if anyone has any leads as to how to implement XML digital
signatures within a web-based form.
Sam
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ashish_agarwal at msdc.hcltech.com Mon Jan 3 10:48:39 2000
From: ashish_agarwal at msdc.hcltech.com (Ashish Agarwal,AMB Chennai)
Date: Mon Jun 7 17:18:58 2004
Subject: xml with xsl
Message-ID: <21FCEFDE42DFD211A1A10007250603B2F3206D@PLUTO>
Hi,
I need access attribute values of my XML code in my XSL code.
Any suggestions please
Rgds,
Ashish
Araise, Awake, stop not till the goal is reached
- Swamy Vivekananda
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Mon Jan 3 11:06:29 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <199912262051.NAA02771@localhost.localdomain>
<14440.52595.283247.36221@localhost.localdomain> <386FA0D2.6845B6F0@pacbell.net>
Message-ID: <387083EF.C563875B@mecomnet.de>
i had understood
{"","a",""},
from the example, to denote a name in a namespace for which there would have
been a declaration, namely a binding such as
<... xmlns="" ... >
for the ignominious "null" namespace. how does this come to correspond to
{ undeclared, "a", valid-prefix } ?
i agree that an "==" implementation needs to account for this, but didn't
think it was nonconformant.
David Brownell wrote:
>
> David Megginson wrote:
> >
> > Clark C. Evans writes:
> >
> > > On Sun, 26 Dec 1999 uche.ogbuji@fourthought.com wrote:
> > > >
> > > > {"http://www.w3.org/1999/xhtml", "a", ""} ==
> > > > {"http://www.w3.org/1999/xhtml", "a", "html"}.
> > >
> > > {"","a",""} != {"","a","html"}
> >
> > As I understood it, the suggestion was that
> >
> > {"", "a", ""} == {"", "a", "html"}
>
> Actually I think the namespace spec defines
>
> { undeclared, "a", valid-prefix }
>
> as "namespace-nonconformant", AKA some kind of error which they
> neglected to describe well enough to support portable APIs.
>
> Meaning that any application choosing to use such a "Name"
> class (which IMHO is a fine notion) needs to treat this value
> with care ... IEEE floating point math has a variety of sorts
> of "NaN" values, perhaps useful models can be found there.
> I'd suggest that most "==" tests against such a Name ought to
> fail, and ordering tests should cause exceptions.
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Mon Jan 3 11:30:23 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:18:58 2004
Subject: Hierarchical namespaces?
References:
Message-ID: <3870898C.3D3E238C@mecomnet.de>
hierarchical namespaces provide the ability to establish symbol identity
indirectly by specifying a network of inheritance relationships among the sets
of names which the respective namespaces entail.
were the concepts and appropriate mechanisms to be made available in the xml
domain, they could be used, for example, to implement versioning and would be
one way to approach problems like the "multi-namespace-html" issue.
one possible analog is the package system in common lisp, which provides the
means to declare relationships among sets of symbols as well as relationships
among individual symbols.
the primitives support such things as
specifying a symbol's membership in a set
specifying visibility from outside the set
specifying inheritance of visible symbols between two sets
specifying limits to visibility from inside a set
please note, that these have nothing to do with what a given symbol may be
bound to, just with its identity.
given these facilities, the application can take the opportunity, when it
declares the "known" names in preparation for specifying processing methods,
to specify that ostensibly distinct names - that is, those with non identical
encodings, are in fact the same name and to be processed in the same way.
while it is true, that it's a shorthand only, it does make the application a
lot easier to code.
Clark C. Evans wrote:
>
>
> That being said, I had never expected a set of namespaces
> to have value by organizing them hierarchially... so I'm
> wondering exactly what value a hierarchy of namespaces would
> provide? Would it be a sequence of ever-so-much-more-specific
> schemas? Where the most specific definition is the binding
> one? I can't think of any other reasons why I'd have more
> than one namespace for a given "domain", let alone a
> hierarchically organized set. What am I missing?
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tpassin at idsonline.com Mon Jan 3 13:32:02 2000
From: tpassin at idsonline.com (Thomas B. Passin)
Date: Mon Jun 7 17:18:58 2004
Subject: xml with xsl
References: <21FCEFDE42DFD211A1A10007250603B2F3206D@PLUTO>
Message-ID: <001501bf55ef$a9b4b400$1c15b0cf@tomshp>
Ashish Agarwal,AMB Chennai wrote:
> Hi,
> I need access attribute values of my XML code in my XSL code.
> Any suggestions please
use @attributename, as in:
The "@" symbol denotes that you are referring to an attribute instead of an
element.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Mon Jan 3 14:24:07 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2 Namespace Support
In-Reply-To: David Brownell's message of "Sun, 02 Jan 2000 10:48:35 -0800"
References: <14430.46481.974707.922192@localhost.localdomain> <012701bf4b44$0c68b030$4a5eedc1@arp01> <14430.55483.433692.943811@localhost.localdomain> <385FA4C9.2B054683@pacbell.net> <14442.32320.722924.870701@localhost.localdomain> <386F9D83.326CB9@pacbell.net>
Message-ID:
David Brownell writes:
> I once did a pretty quick'n'dirty one that cost barely 10% even though
> it used DOM data structures (which, for attribute lists and values, are
> often grossly inefficient). I've every reason to believe it could be
> done with much lower cost. Perhaps your 25% was doing more work than
> was required.
Basically, an NS layer has to look at every element and attribute name
and check whether it begins with xmlns or contains a colon, and it has
to copy (or wrap) the attribute list if it contains an xmlns*
attribute or a prefixed attribute name.
After my initial tests, I managed some savings by maintaining a stack
of hash maps (one for each Namespace state) to cache names that had
already been seen and save some of the more expensive string
operations, but the attribute-list iteration and copying couldn't be
avoided, and they can be costly.
> Then there's also the approach of having the processing be integrated
> with the next layer, which already needs to iterate and examine. (And
> with different goals than a parser!) Such approaches can reduce the
> cost much further -- effectively, to zero.
Yes, but you lose a *lot* of reusability -- the Namespace processor
has to be written again for each process that uses it (XSL, XLink,
RDF, etc.) rather than just once.
> Raising that point about compatibility. There's not been much of
> discussion abou the fairly substantial change you're proposing,
> that SAX1 and SAX2 seemingly be incompatible at this basic level.
> It's only come out implicitly in reaction to other points.
Actually, I described it quite explicitly in my posting "SAX2:
Namespace Proposal":
With SAX2 alpha 1, the idea was to preserve SAX 1.0 pretty much intact
and add extra features to it. Upon reflection, I think that it will
make more sense to create a whole new package, org.xml.sax2 (if OASIS
gives permission), which is similar to org.xml.sax in many but not all
respects -- that will avoid nightmarish problems with classpaths,
etc., and it will be quite easy to write adapters.
For some reason, this message is missing from the archive, though
there are dozens of replies to it.
> I've been leaning in various cases to "XML+namespaces" as a default,
> but think it _must_ be possible to do more than "try" to disable it.
> Namespaces are not mandatory (not part of the XML spec) and by now
> it's well known they're not trouble-free. SAX2 shouldn't preclude
> systems that choose not to use namespaces.
To be fair, it wouldn't preclude systems that choose not to use
Namespaces, unless they also chose to use names with colons in
different ways (and the XML 1.0 REC warns strongly against doing so).
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From clark.evans at manhattanproject.com Mon Jan 3 14:51:10 2000
From: clark.evans at manhattanproject.com (Clark C. Evans)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2: Should SAXException extend IOException?
In-Reply-To: <386FD22D.765781EE@pacbell.net>
Message-ID:
On Sun, 2 Jan 2000, David Brownell wrote:
> > -- you get a ZipException, presumably, because of an error
> > in the format of the zip file you're reading from;
>
> Curious example. java.util.zip.DataFormatException is what I'd
> expect to get when faced with bad ZIP data. (Recalling some of
> the chaos involved in seeing JDK 1.1 get ZIP/JAR support, it's
> no surprise that its exception architecture seems pretty odd.)
>
> That's not an IOException.
I don't think it is all that cut and dry.
Let's say that you are reading information
from a TCP/IP pipe. And that, according to
the protocol, the next token arriving should
be an X. Now suppose that a Y arrives
instead. Is this an IOException?
Suppose instead that the file system directory
says that file FILE is N bytes long. Also
suppose, that the file system uses the token
X to mark the end of a file. Now, let's say
that while reading FILE from the hard drive,
token Y was found at position N instead of X.
Is this an IOException?
I guess I'm trying to say that a data format
exception in one context could easily be seen
as an I/O exception in another context.
Clark
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From costello at mitre.org Mon Jan 3 16:44:07 2000
From: costello at mitre.org (Roger Costello)
Date: Mon Jun 7 17:18:58 2004
Subject: Specifying scope of uniqueness in XML Schemas?
References: <33D189919E89D311814C00805F1991F7F4AAF5@RED-MSG-08> <386CA878.67743310@mitre.org> <386F4B76.106883C7@mitre.org>
Message-ID: <3870D246.C68BB9FD@mitre.org>
Hi Folks,
In section 3.7 of the XML Schema spec it talks about the mechanism for
indicating uniqueness (of elements, attributes, or combinations
thereof). It says that you can specify uniqueness within a region, or
over the entire document:
"Constraints can be specified to have document-wide scope or to hold
within the scope of particular elements."
Can someone explain to me how you indicate the scope of a constraint? I
am guessing that it is with the selector element, but I am not sure.
/Roger
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Mon Jan 3 17:22:27 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2: Should SAXException extend IOException?
References:
Message-ID: <3870DA79.3F74F404@pacbell.net>
"Clark C. Evans" wrote:
>
> I guess I'm trying to say that a data format
> exception in one context could easily be seen
> as an I/O exception in another context.
Actually, everything boils down to an EINVAL at
some level ... everything else is just varying
layers of sugar to explain what was INVAL ! ;-)
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tmmet at hotmail.com Mon Jan 3 17:24:25 2000
From: tmmet at hotmail.com (tmmet tvp)
Date: Mon Jun 7 17:18:58 2004
Subject: Sorting,filtering and search
Message-ID: <20000103172350.8084.qmail@hotmail.com>
Hi,
Can anyone help me out.Any ideas or suggestions will be greatly helpful for
me.
I've a list box with all the tag name attributes in my xml file .
Say as,
Filter using :
Title,
Author,
name,
Id
When I click on/select from this list box,I should filter my xml file using
the attribute that I selected from the list box and create a tree view(as in
explorer).
I've to do this filtering and tree view display using xsl.
Filtering is not working for me.
Can you help me out.This is very urgent.If you have time,can you help me?.
In my xsl file,
//do the tree view code here
//do the tree view code here
Its not working.That is,its not filtering.
I don't know where is the exaxt error.
Its displaying the entire contents.Its not filtering.
Can you please help me out.
Thanks in advance.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Mon Jan 3 17:29:59 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:18:58 2004
Subject: Specifying scope of uniqueness in XML Schemas?
In-Reply-To: Roger Costello's message of "Mon, 03 Jan 2000 11:45:58 -0500"
References: <33D189919E89D311814C00805F1991F7F4AAF5@RED-MSG-08> <386CA878.67743310@mitre.org> <386F4B76.106883C7@mitre.org> <3870D246.C68BB9FD@mitre.org>
Message-ID:
Roger Costello writes:
> In section 3.7 of the XML Schema spec it talks about the mechanism for
> indicating uniqueness (of elements, attributes, or combinations
> thereof). It says that you can specify uniqueness within a region, or
> over the entire document:
>
> "Constraints can be specified to have document-wide scope or to hold
> within the scope of particular elements."
>
> Can someone explain to me how you indicate the scope of a constraint? I
> am guessing that it is with the selector element, but I am not sure.
Sorry this isn't clearer: The scope is indicated by where the
declaration goes: if I put a element within an element
declaration for an element named 'foo', then the uniqueness and
ubiquity constraints obtain within each ... in a document.
The tells you which elements WITHIN each must have keys.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From clark.evans at manhattanproject.com Mon Jan 3 18:02:07 2000
From: clark.evans at manhattanproject.com (Clark C. Evans)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2: Should SAXException extend IOException?
In-Reply-To: <3870DA79.3F74F404@pacbell.net>
Message-ID:
On Mon, 3 Jan 2000, David Brownell wrote:
> "Clark C. Evans" wrote:
> > I guess I'm trying to say that a data format
> > exception in one context could easily be seen
> > as an I/O exception in another context.
>
> Actually, everything boils down to an EINVAL at
> some level ... everything else is just varying
> layers of sugar to explain what was INVAL ! ;-)
Yes. And the detail of such sugar should depend
upon the task being performed.
A SAX parser is not a library of functions each performing
distinct granular and possibly recoverable operations.
Rather, a SAX parser is a processing component which takes
an XML input source and generates an event stream as output.
It's internal workings are encapsulated -- it does not expose
highly granular control of its process. Thus, possible
automated recover schemes are (understandably) rather limited.
Therefore, it seems perfectly acceptable for the error to be
generic. Further, if you consider the SAX parser's primary
task, that of converting an input source to an output stream,
of the generic errors, IOException seems the best fit.
Clark
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From begeddov at jfinity.com Mon Jan 3 18:26:10 2000
From: begeddov at jfinity.com (Gabe Beged-Dov)
Date: Mon Jun 7 17:18:58 2004
Subject: locally scoped element decls and namespaces
Message-ID: <3870E62A.8C62FE4@jfinity.com>
I have a hopefully simple question concerning locally
scoped element decls and namespaces. Here is an example
schema:
Given this schema, here is an instance:
Helen
Jones
Is this right or should fname and lname be bound to the
same namespace as Person, i.e.:
Helen
Jones
Cordially from Corvallis,
Gabe Beged-Dov
--
---------------------------
http://www.jfinity.com/gabe
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Mon Jan 3 19:00:41 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2: Should SAXException extend IOException?
References:
Message-ID: <3870F1DB.3A00147F@pacbell.net>
"Clark C. Evans" wrote:
>
> On Mon, 3 Jan 2000, David Brownell wrote:
> > "Clark C. Evans" wrote:
> > > I guess I'm trying to say that a data format
> > > exception in one context could easily be seen
> > > as an I/O exception in another context.
> >
> > Actually, everything boils down to an EINVAL at
> > some level ... everything else is just varying
> > layers of sugar to explain what was INVAL ! ;-)
>
> Yes. And the detail of such sugar should depend
> upon the task being performed.
The interface spec captures such details. So for
example "it's not there" (EINVAL) is distinct from
"what's there is corrupt" (EINVAL) is distinct from
"what's there has validity errors" (EINVAL) is also
different from "unsupported encoding" (EINVAL).
> Rather, a SAX parser is a processing component which takes
> an XML input source and generates an event stream as output.
> It's internal workings are encapsulated -- it does not expose
> highly granular control of its process.
No exception exposes "control"; it's a fault report,
the processor can't continue, and it's saying exactly
why it couldn't continue. The sugar over "EINVAL" is
critical to enabling robust fault recovery.
Of course, there are people who write software that's
not robust. Even managers who insist on it, and make
careers out of fixing the ensuing fires.
> Thus, possible
> automated recover schemes are (understandably) rather limited.
Which is why I can't understand the motivation to make
distinguishing the really basic cases be any more error
prone than it already is. Any win is at best minor (not
that I agree there is one), and there are visible costs.
Bugs in fault handling code are by far the hardest to find
and fix. Strongly typed exceptions are one of the few tools
that have come along to address that in the past decade.
> Therefore, it seems perfectly acceptable for the error to be
> generic. Further, if you consider the SAX parser's primary
> task, that of converting an input source to an output stream,
> of the generic errors, IOException seems the best fit.
You deleted (and then ignored) the points I raised about
why "generic" _reports_ of non-generic errors are bad, so
I'll just say I remain unconvinced.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From andrewl at microsoft.com Mon Jan 3 19:20:31 2000
From: andrewl at microsoft.com (Andrew Layman)
Date: Mon Jun 7 17:18:58 2004
Subject: Namespaces and Validating XML Parsers Question
Message-ID: <33D189919E89D311814C00805F1991F7F4AB05@RED-MSG-08>
The namespaces specification does not provide any particular means to
associate a namespace with any defining or collateral documents (e.g.
schemas). It only provides a means to map qualified name prefixes to URIs,
thereby allowing names to be unique.
The specification leaves it up to other facilities to actually associate
those unique names with related documents. One such facility is the XML
Schemas specification, which contains a mechanism by which an author can
associate a schema with a namespace.
-----Original Message-----
From: Bruce D. Nilo [mailto:bruce@nilo.com]
Sent: Thursday, December 30, 1999 7:00 PM
To: xml-dev@ic.ac.uk
Subject: Namespaces and Validating XML Parsers Question
Apologies if this is a well understood question. I am recently slogging
through the XML specs and tools and have not really found anything
that sheds light on this question. I hope the answer is a simple one.
I believe I understand the rationale and syntax of namespaces for XML
application instances. However I can find nowhere any explanation
as to how a validating parser knows how to associate an element or
attribute that is in a specific namespace with the elements and
attributes of either an external or internal DTD reference. Am I
missing something here, or is the specification punting entirely on
the issue? It seems to me that either the application instance must
associate a namespace declaration with a specific DTD or the DTD
itself must declare its name. If this is not the case the XML parser
has a difficult job determining how to interpret the names in a namespace
with those of a number of referenced DTDs which have name collisions.
- Bruce
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From andrewl at microsoft.com Mon Jan 3 20:03:52 2000
From: andrewl at microsoft.com (Andrew Layman)
Date: Mon Jun 7 17:18:58 2004
Subject: locally scoped element decls and namespaces
Message-ID: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08>
The first is the right interpretation of local namespaces.
-----Original Message-----
From: Gabe Beged-Dov [mailto:begeddov@jfinity.com]
Sent: Monday, January 03, 2000 10:11 AM
To: XML List
Cc: xml-schema-comments
Subject: locally scoped element decls and namespaces
I have a hopefully simple question concerning locally
scoped element decls and namespaces. Here is an example
schema:
Given this schema, here is an instance:
Helen
Jones
Is this right or should fname and lname be bound to the
same namespace as Person, i.e.:
Helen
Jones
Cordially from Corvallis,
Gabe Beged-Dov
--
---------------------------
http://www.jfinity.com/gabe
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From clark.evans at manhattanproject.com Mon Jan 3 20:05:58 2000
From: clark.evans at manhattanproject.com (Clark C. Evans)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX2: Should SAXException extend IOException?
In-Reply-To: <3870F1DB.3A00147F@pacbell.net>
Message-ID:
On Mon, 3 Jan 2000, David Brownell wrote:
> > Yes. And the detail of such sugar should depend
> > upon the task being performed.
>
> The interface spec captures such details. So for
> example "it's not there" (EINVAL) is distinct from
> "what's there is corrupt" (EINVAL) is distinct from
> "what's there has validity errors" (EINVAL) is also
> different from "unsupported encoding" (EINVAL).
Of course it would be nice to have a more explicit list
of specific exceptions...
However, the question was if these exceptions (be it one or
many explicit ones) should extend IOException, or should be
part of a seperate sub-tree, or should be spread out over
several root trees (both IOException and SaxException).
> > Rather, a SAX parser is a processing component which takes
> > an XML input source and generates an event stream as output.
> > It's internal workings are encapsulated -- it does not expose
> > highly granular control of its process.
>
> No exception exposes "control"; it's a fault report,
> the processor can't continue, and it's saying exactly
> why it couldn't continue. The sugar over "EINVAL" is
> critical to enabling robust fault recovery.
I don't think we are in disagreement here -- "it" was
referring to the parser as a whole, not just the relevant
exceptions. As you carefully point out, without relevant
exceptions over the possible fault space, you can't make
specific corrections, thus control is reduced.
> > Thus, possible automated recover schemes are
> > (understandably) rather limited.
>
> Which is why I can't understand the motivation to make
> distinguishing the really basic cases be any more error
> prone than it already is. Any win is at best minor (not
> that I agree there is one), and there are visible costs.
What would be helpful (to move the discussion along)
is a list of possible use cases for fault recovery.
You have a nice starter list above. How about:
IOException
SaxException
SaxInvalidEncodingException
SaxInputSourceNotFoundException
SaxNotWellFormedException
SaxUnknownEntityException
SaxMisMatchedElementException
...
SaxNotValidException
> Bugs in fault handling code are by far the hardest to find
> and fix. Strongly typed exceptions are one of the few tools
> that have come along to address that in the past decade.
Yes, they can be very useful. Especially the C++/Java style
exceptions that are not easily ignored (unlike C return values)
> > Therefore, it seems perfectly acceptable for the error to be
> > generic. Further, if you consider the SAX parser's primary
> > task, that of converting an input source to an output stream,
> > of the generic errors, IOException seems the best fit.
>
> You deleted (and then ignored) the points I raised about
> why "generic" _reports_ of non-generic errors are bad, so
> I'll just say I remain unconvinced.
Very sorry. I don't think I was trying to argue
against specific exceptions.
..
I was attempting to express that, as a core function,
the SAX parser is a input/output adapter, converting an
XML source as input into a stream of events as output.
Therefore, it makes perfect sense for the base exception
to be an IOException. Having specific exceptions are a
very welcome bonus.
Clark
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From costello at mitre.org Mon Jan 3 20:42:43 2000
From: costello at mitre.org (Roger Costello)
Date: Mon Jun 7 17:18:58 2004
Subject: locally scoped element decls and namespaces
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08>
Message-ID: <38710A38.D00352B8@mitre.org>
Let me see if I understand this correctly. If I wish to indicate in the
instance document that everything between and
conforms to the schema in urn:person-schema/person-schema.xsd, then this
is the correct syntax:
Helen
Jones
If the above is correct, then please tell me what it means when we don't
declare the namespace:
Helen
Jones
/Roger
Andrew Layman wrote:
>
> The first is the right interpretation of local namespaces.
>
> -----Original Message-----
> From: Gabe Beged-Dov [mailto:begeddov@jfinity.com]
> Sent: Monday, January 03, 2000 10:11 AM
> To: XML List
> Cc: xml-schema-comments
> Subject: locally scoped element decls and namespaces
>
> I have a hopefully simple question concerning locally
> scoped element decls and namespaces. Here is an example
> schema:
>
>
>
>
>
>
>
>
>
> Given this schema, here is an instance:
>
>
> xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
> Helen
> Jones
>
>
> Is this right or should fname and lname be bound to the
> same namespace as Person, i.e.:
>
>
> xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
> Helen
> Jones
>
>
> Cordially from Corvallis,
>
> Gabe Beged-Dov
>
> --
> ---------------------------
> http://www.jfinity.com/gabe
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
> 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
> message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From stefan.haustein at trantor.de Mon Jan 3 21:39:46 2000
From: stefan.haustein at trantor.de (Stefan Haustein)
Date: Mon Jun 7 17:18:58 2004
Subject: added namespace support to pull parser
Message-ID: <3871175C.D913987B@trantor.de>
Hello!
I added namespace support to my java pull parser. It's available at:
http://www.trantor.de/xml.
best regards
Stefan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dpotter at mitre.org Mon Jan 3 21:58:55 2000
From: dpotter at mitre.org (Daniel Potter)
Date: Mon Jun 7 17:18:58 2004
Subject: XML Schemas and the Enumeration Facet
Message-ID: <387119D2.85F33FBE@mitre.org>
I have some questions about using the enumeration facet along with other
facets which I hope someone can explain.
The enumeration facet is defined as "constrain[ing] the value space of
the datatype to the specified list" which I take to mean intuitively
that the "instances" of data which are to be checked against the
datatype with the enumeration must be in the list.
An enumeration could be as follows:
This would mean that any elements corresponding to the example datatype
must be either "first value", "another" or "third". So
third is OK, but ABC is wrong.
(Assuming example is of type example, of course :)
HOWEVER, suppose that instead:
This would be OK, except that "first value" has a length of eleven,
meaning that it does not fit in the datatype where the maximum length is
seven. However, it is specified to belong by enumeration. Which takes
precendence? The first to appear? The last?
Can enumeration be used to add values which would otherwise be illegal?
And what happens when enumeration is used with other facets? Apparently
this is legal. And if a user-defined datatype specifies facets over a
datatype with enumerated values, what happens if the new facets render
some of the enumerated values invalid? (Or what if it enumerates values
which are illegal by the underlying datatype it's generated over?)
Finally, a quick question about the float/double datatype. Should the
default exponent *really* be one? Shouldn't it be zero? According to
the spec, if Exx is not specified, it defaults to one. Isn't 1E1 = 10?
So wouldn't that multiply all values by ten compared to what the author
most likely intended? (If I wrote 3.14159, wouldn't it
be read as 31.4159?) Just curious if this is a typo, or if I'm
misunderstanding something, or if it is intended the way I understand
it.
Thanks for any help on these questions.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From andrewl at microsoft.com Mon Jan 3 22:52:27 2000
From: andrewl at microsoft.com (Andrew Layman)
Date: Mon Jun 7 17:18:58 2004
Subject: locally scoped element decls and namespaces
Message-ID: <33D189919E89D311814C00805F1991F7F4AB12@RED-MSG-08>
I don't quite understand your question. In your second example, the
element is not associated with any namespace, neither are the child
elements, nor are any of them associated with any schema. I think that is
the end of the story.
-----Original Message-----
From: Roger Costello [mailto:costello@mitre.org]
Sent: Monday, January 03, 2000 12:45 PM
To: XML List
Cc: xml-schema-comments
Subject: Re: locally scoped element decls and namespaces
Let me see if I understand this correctly. If I wish to indicate in the
instance document that everything between and
conforms to the schema in urn:person-schema/person-schema.xsd, then this
is the correct syntax:
Helen
Jones
If the above is correct, then please tell me what it means when we don't
declare the namespace:
Helen
Jones
/Roger
Andrew Layman wrote:
>
> The first is the right interpretation of local namespaces.
>
> -----Original Message-----
> From: Gabe Beged-Dov [mailto:begeddov@jfinity.com]
> Sent: Monday, January 03, 2000 10:11 AM
> To: XML List
> Cc: xml-schema-comments
> Subject: locally scoped element decls and namespaces
>
> I have a hopefully simple question concerning locally
> scoped element decls and namespaces. Here is an example
> schema:
>
>
>
>
>
>
>
>
>
> Given this schema, here is an instance:
>
>
> xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
> Helen
> Jones
>
>
> Is this right or should fname and lname be bound to the
> same namespace as Person, i.e.:
>
>
> xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
> Helen
> Jones
>
>
> Cordially from Corvallis,
>
> Gabe Beged-Dov
>
> --
> ---------------------------
> http://www.jfinity.com/gabe
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on
CD-ROM/ISBN
> 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
> message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on
CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From roddey at us.ibm.com Mon Jan 3 23:28:33 2000
From: roddey at us.ibm.com (roddey@us.ibm.com)
Date: Mon Jun 7 17:18:58 2004
Subject: Request for Discussion: SAX 1.0 in C++
Message-ID: <8725685B.0080EC28.00@d53mta03h.boulder.ibm.com>
>> For those folks who need to store text, they can certainly strip off
>> unwanted bytes before storing it. It is much more reasonable to
>> require transcoding of people storing text than to require everyone
>> using the data on the fly to transcode.
>
>Using data on the fly is what I want to do. That's why I prefer to
>get it in the form I will use it.
>
For most people though, UTF-8 is a loser. If you want to do any poking
around in the text, having it be UTF-8 (a non-fixed size encoding) is a
huge pain in the butt. In my opinion, Unicode is it, period. Its the
future, and everyone should start dealing with it. Unicode based wide
character APIs are available almost everywhere so that you can work
directly with the Unicode until it actually has to go to some system API
that requires it be in a local code page.
----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
roddey@us.ibm.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From roddey at us.ibm.com Mon Jan 3 23:31:05 2000
From: roddey at us.ibm.com (roddey@us.ibm.com)
Date: Mon Jun 7 17:18:58 2004
Subject: No subject
Message-ID: <8725685B.0081274E.00@d53mta03h.boulder.ibm.com>
> SAXString(const char* p)
> : basic_string(p)
> {
> // do UTF-8 to UTF-16 decoding here
> }
>
>};
>
>and then:
>
>void DocumentHandler::startElement (
> const SAXString& name, const AttributeList& atts)
>{
> if (name == SAXString("Paragraph")) ...
>}
>
If anything, it should go the other way. Unicode should be the core API,
and there should be helper API to allow the use of local code page chars
where necessary. Everything should be set up to optimize use of the Unicode
API, with local code page use paying the price, since Unicode is the more
desireable format.
----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
roddey@us.ibm.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From sb at metis.no Tue Jan 4 07:40:14 2000
From: sb at metis.no (Steinar Bang)
Date: Mon Jun 7 17:18:58 2004
Subject: Request for Discussion: SAX 1.0 in C++
In-Reply-To: roddey@us.ibm.com's message of "Mon, 3 Jan 2000 16:28:09 -0700"
References: <8725685B.0080EC28.00@d53mta03h.boulder.ibm.com>
Message-ID:
>>>>> roddey@us.ibm.com:
>>> For those folks who need to store text, they can certainly strip off
>>> unwanted bytes before storing it. It is much more reasonable to
>>> require transcoding of people storing text than to require everyone
>>> using the data on the fly to transcode.
>> Using data on the fly is what I want to do. That's why I prefer to
>> get it in the form I will use it.
> For most people though, UTF-8 is a loser.
Please note that in the quoted text, I was talking about converting
from UTF-16 stored in 32 bit wchar_t, to UTF-16 stored in 16 bit wide
character strings.
I was worried about the overhead of using 32 bit for 16 bit values,
and I was worried about the conversion overhead from 32 bit to 16 bit
strings.
Nothing about UTF-8 at all.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From sb at metis.no Tue Jan 4 09:04:49 2000
From: sb at metis.no (Steinar Bang)
Date: Mon Jun 7 17:18:58 2004
Subject: SAX/C++: First interface draft
In-Reply-To: Steinar Bang's message of "27 Dec 1999 22:24:55 +0100"
References: <14406.59198.949047.2487@localhost.localdomain> <38474BAF.AF4CFF2D@jclark.com>
Message-ID:
>>>>> Steinar Bang :
>>>>> James Clark :
>> One interesting issue is whether to provide a virtual destructor. I
>> think the safest solution is not to provide a virtual destructor but
>> instead to declare but not define a private operator delete. This makes
>> it a compile time error to do:
>> DTDHandler *p;
>> // ...
>> delete p;
> [snip! problems with virtual destructors in dispatching DocumentHandlers]
Another place this might be a problem, is when throwing exceptions.
How long do the exception objects live? Are they copied? Are they
deleted?
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From uche.ogbuji at fourthought.com Tue Jan 4 09:18:34 2000
From: uche.ogbuji at fourthought.com (Uche Ogbuji)
Date: Mon Jun 7 17:18:58 2004
Subject: ANN: 4DOM 0.9.1
Message-ID: <3871BADF.9F02F6E9@fourthought.com>
FourThought LLC (http://FourThought.com) announces the release of
4DOM 0.9.1
-----------------------
An XML/HTML Python library using the
Document Object Model interface
4DOM is a Python library for XML and HTML processing and manipulation
using the W3C's Document Object Model for interface. 4DOM implements
DOM Core level 2, HTML level 2 and Level 2 Document Traversal.
4DOM should work on all platforms supported by Python. If you have
any problems with a particular platform, please e-mail the authors.
4DOM is designed to allow developers rapidly design applications
that read, write or manipulate HTML and XML.
News
----
This is a bug-fix release.
More info and Obtaining 4DOM
----------------------------
Please see
http://FourThought.com/4Suite/4DOM
Or you can download 4DOM from
ftp://FourThought.com/pub/4Suite/4DOM
4DOM is distributed under a license similar to that of Python.
--
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com (970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com http://OpenTechnology.org
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ashish_agarwal at msdc.hcltech.com Tue Jan 4 11:10:04 2000
From: ashish_agarwal at msdc.hcltech.com (Ashish Agarwal,AMB Chennai)
Date: Mon Jun 7 17:18:59 2004
Subject: Problems with the mailing list
Message-ID: <21FCEFDE42DFD211A1A10007250603B2F3252A@PLUTO>
I am receiving 2 copies of each mail fromn the mailing list.
I request the moderator to please look into it.
Regards,
Ashish Agarwal
Araise, Awake, stop not till the goal is reached
- Swamy Vivekananda
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From msabin at cromwellmedia.co.uk Tue Jan 4 12:04:44 2000
From: msabin at cromwellmedia.co.uk (Miles Sabin)
Date: Mon Jun 7 17:18:59 2004
Subject: SAX2: Parser interface
Message-ID:
David Megginson wrote,
> Here is my current draft of the SAX2 Parser class:
>
> public interface Parser
> {
> public void setLocale (Locale locale)
> throws SAXNotSupportedException;
What's the rationale for this? How do Locales (as opposed to
character encodings) fit in with XML parsing?
Cheers,
Miles
--
Miles Sabin Cromwell Media
Internet Systems Architect 5/6 Glenthorne Mews
+44 (0)20 8817 4030 London, W6 0LJ, England
msabin@cromwellmedia.com http://www.cromwellmedia.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Tue Jan 4 12:50:19 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:18:59 2004
Subject: locally scoped element decls and namespaces
In-Reply-To: Roger Costello's message of "Mon, 03 Jan 2000 15:44:40 -0500"
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08> <38710A38.D00352B8@mitre.org>
Message-ID:
Roger Costello writes:
> Let me see if I understand this correctly. If I wish to indicate in the
> instance document that everything between and
> conforms to the schema in urn:person-schema/person-schema.xsd, then this
> is the correct syntax:
>
> xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
> xsi:schemaLocation="urn:person-schema
> urn:person-schema/person-schema.xsd">
Helen
Jones
Helen
Jones
>
With all respect to Andrew Layman, the working group has not yet
settled this question (what is the correct form for element GIs with
locally scoped declarations), which is logged as an outstanding issue.
There are strong arguments for and against both answers.
> If the above is correct, then please tell me what it means when we don't
> declare the namespace:
>
> xsi:schemaLocation="urn:person-schema
> urn:person-schema/person-schema.xsd">
> Helen
> Jones
>
There's something missing from your example, and the answer depends on
which way you fill it in:
1) The default namespace is declared with the URI "urn:person-schema":
Helen
Jones
which ONLY is coherent under the second (elements with locally-scoped
declarations are declared in the same namespace as their parent is
declared in) interpretation. To produce a schema-valid instance under
the first (element with locally-scoped declarations are in NO
namespace) interpretation, the following would be required:
Helen
Jones
2) You meant the document to not use any namespace at all:
Helen
Jones
We don't yet have a concrete syntax for indicating an association
between "no namespace" and a schema in xsi:schemaLocation. We know we
need to fill this gap. The locally-scoped element declaration issue
doesn't arise in this case, or rather both interpretations give the
same answer.
> /Roger
>
> Andrew Layman wrote:
> >
> > The first is the right interpretation of local namespaces.
Again, with respect, the question of whether locally-scoped element
declarations imply local namespace [partitions] has not been resolved
by the WG.
> >
> > -----Original Message-----
> > From: Gabe Beged-Dov [mailto:begeddov@jfinity.com]
> > Sent: Monday, January 03, 2000 10:11 AM
> > To: XML List
> > Cc: xml-schema-comments
> > Subject: locally scoped element decls and namespaces
> >
> > I have a hopefully simple question concerning locally
> > scoped element decls and namespaces. Here is an example
> > schema:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Given this schema, here is an instance:
> >
> > >
> > xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
> > Helen
> > Jones
> >
> >
> > Is this right or should fname and lname be bound to the
> > same namespace as Person, i.e.:
> >
> > >
> > xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance'>
> > Helen
> > Jones
> >
> >
> > Cordially from Corvallis,
> >
> > Gabe Beged-Dov
> >
> > --
> > ---------------------------
> > http://www.jfinity.com/gabe
> >
> > xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> > Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN
> > 981-02-3594-1
> > To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> > unsubscribe xml-dev
> > To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
> > message;
> > subscribe xml-dev-digest
> > List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
> >
> > xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> > Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> > To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> > unsubscribe xml-dev
> > To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> > subscribe xml-dev-digest
> > List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
>
>
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From haustein at ls8.cs.uni-dortmund.de Tue Jan 4 12:58:53 2000
From: haustein at ls8.cs.uni-dortmund.de (Stefan Haustein)
Date: Mon Jun 7 17:18:59 2004
Subject: sax2: cdata, characters and ignorable whitespace
Message-ID: <3871EE6B.66DB1DC4@ls8.cs.uni-dortmund.de>
If sax2 shall report cdata boundaries also,
wouldn't be the simples solution to integrate
ignoreableWhitespace, characters and cdata
into one DocumentHandler callback method:
void characters (int type, char [] characters, int start, int length);
The value of the type parameter is one of
the integer constants IGNORABLE_WHITESPACE,
CHARACTERS, or CDATA.
SAX1 compatibility could be achived by having
two setDocumentHandler methods in the Parser interface:
setDocumentHandler (org.xml.sax2.DocumentHandler);
and the old
setDocumentHandler (org.xml.sax.DocumentHandler);
as already "proposed"(?) by David, but with different
behavior: Only one handler can be active at the same
time.
setDocumentHandler (org.xml.sax.DocumentHandler documentHandler)
is just a convenience method and
should be implementded as follows:
setDocumentHandler (org.xml.sax.DocumentHandler sax1DocumentHandler) {
setDocumentHandler
(new org.xml.sax2.helpers.Sax1DocumentHandlerWrapper
(sax1DocumentHandler));
}
Best regards
Stefan
--
Stefan Haustein
University of Dortmund
Computer Science VIII
www-ai.cs.uni-dortmund.de
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Tue Jan 4 13:58:19 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:18:59 2004
Subject: SAX2: Parser interface
In-Reply-To:
References:
Message-ID: <14449.64583.6694.198634@localhost.localdomain>
Miles Sabin writes:
> David Megginson wrote,
> > Here is my current draft of the SAX2 Parser class:
> >
> > public interface Parser
> > {
> > public void setLocale (Locale locale)
> > throws SAXNotSupportedException;
>
> What's the rationale for this? How do Locales (as opposed to
> character encodings) fit in with XML parsing?
Error reporting.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Tue Jan 4 14:03:20 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:18:59 2004
Subject: Unicode confusion
In-Reply-To: roddey@us.ibm.com's message of "Mon, 3 Jan 2000 16:30:40 -0700"
References: <8725685B.0081274E.00@d53mta03h.boulder.ibm.com>
Message-ID:
roddey@us.ibm.com writes:
> If anything, it should go the other way. Unicode should be the core
> API, and there should be helper API to allow the use of local code
> page chars where necessary. Everything should be set up to optimize
> use of the Unicode API, with local code page use paying the price,
> since Unicode is the more desireable format.
No one's disagreeing with the use of Unicode; we're talking about
which character encoding we'll use to represent it. You can represent
Unicode in variable-width 8-bit or 16-bit encodings or in fixed-width
32-bit encodings.
Note that Java uses UTF-16, which isn't quite fixed-width, though no
one really notices.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Tue Jan 4 14:08:16 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:18:59 2004
Subject: sax2: cdata, characters and ignorable whitespace
In-Reply-To: Stefan Haustein's message of "Tue, 04 Jan 2000 13:58:19 +0100"
References: <3871EE6B.66DB1DC4@ls8.cs.uni-dortmund.de>
Message-ID:
Stefan Haustein writes:
> If sax2 shall report cdata boundaries also,
> wouldn't be the simples solution to integrate
> ignoreableWhitespace, characters and cdata
> into one DocumentHandler callback method:
>
> void characters (int type, char [] characters, int start, int length);
>
> The value of the type parameter is one of
> the integer constants IGNORABLE_WHITESPACE,
> CHARACTERS, or CDATA.
It has two major disadvantages:
1. Characters in CDATA really are normal characters in the XML
definition, and the fact that they're in a CDATA section is just
noise for most apps (and doesn't belong in the core
DocumentHandler).
2. People who do care about CDATA sections might be unhappy to have
two consecutive CDATA sections collapsed into one.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From costello at mitre.org Tue Jan 4 14:21:25 2000
From: costello at mitre.org (Roger L. Costello)
Date: Mon Jun 7 17:18:59 2004
Subject: Round 2: How an XML instance document references an XML Schema
Message-ID: <38720239.481577DF@mitre.org>
Hi Folks,
There has been a considerable amount of discussion (and confusion) on
how an XML instance document indicates the XML Schema(s) that it
conforms to. I am not sure that it is yet clear in people's minds on
how to do it. I will take a stab at explaining it, based upon the
discussions. However, we really need this to be verified by someone
from the Schema WG.
[Henry, I haven't fully digested your most recent message. Hopefully
the following is consistent with what you said.]
[Also, thanks a lot to Henry Thompson, Andrew Layman, and Rick Jelliffe
for taking the time to answer my endless barrage of questions. I hope
that these questions and their answers are useful to all.]
Case 1. Entire instance document conforms to a single XML Schema
Let's use the example that Gabe Beged-Dov gave yesterday. Here's the
skeleton of the XML Schema:
...
Let's assume that the URI for this schema is:
urn:person-schema/person-schema.xsd
Thus the namespace for the elements and attributes that are declared in
person-schema.xsd is urn:person-schema.
An XML instance document that wishes to indicate that all or part of it
conforms to person-schema.xsd must use the attribute, schemaLocation.
The value of schemaLocation must include a pair of values - the
namespace (urn:person-schema) and the URI to the Schema
(urn:person-schema/person-schema.xsd). Thus, for this case the value of
schemaLocation is:
schemaLocation="urn:person-schema
urn:person-schema/person-schema.xsd"
A Schema-validating parser will use the URI to fetch the schema
document, and then will verify that the targetNamespace value matches
the namespace in schemaLocation.
The schemaLocation attribute is defined in the schema instance
namespace. So, to use it in our instance document we first need to
define a qualifier for the schema instance namespace and then prefix
schemaLocation:
xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
xsi:schemaLocation="urn:person-schema
urn:person-schema/person-schema.xsd"
Now then, is that all that's needed in the XML instance document -
simply add schemaLocation as an attribute to the root element, i.e.
Helen
Jones
Based upon Andrew Layman's messages yesterday, the answer is no. I
believe that I now understand why. In the above instance document we
have not declared a namespace for the elements - Person, fname, and
lname. Thus, they are in the document's namespace. However, with the
schemaLocation attribute we are asserting that the elements declared in
the schema are in the urn:person-schema namespace. Thus, in our
instance document we must make a namespace declaration to indicate that
the elements in the instance document also are in the urn:person-schema
namespace. Since we want to declare that all the instance document
elements come from the urn:person-schema namespace, we can use it as the
default namespace. Thus, our instance document looks like this:
Helen
Jones
Using the default namespace declaration, all the elements in the
instance document have the same namespace as the schema namespace.
Thus, the entire instance document will get schema-validated.
Case 2. Part of the instance document conforms to a single XML Schema
Let's use the same schema as above and the same instance document.
However, in this case let's suppose that we just want to validate
"fname" against the schema. What would the instance document look like?
As usual we use the schemaLocation attribute to indicate the schema that
we are using. In the instance document we need to distinguish between
those elements that are in the document namespace versus the fname
element which is in the urn:person-schema. We can do this anywhere, but
for simplicity let's do it at the root element:
Helen
Jones
The only element in the instance document which has the same namespace
as the schema namespace is fname. Thus, it is the only element which
will get schema-validated.
Case 3. Instance document conforms to multiple XML Schemas
Let's suppose that we have a second schema. This second schema
specializes in defining last names (I know, it's silly):
...
Note that this second schema's namespace is:
urn:last-name-schema
Let's continue to use the same instance document. However, let's assume
that we want to validate fname against the first schema and lname
against the second schema. For the Person element, we don't want any
validation.
Our schemaLocation attribute now will have two pairs of values - the
first pair is for the first schema and the second pair is for the second
schema. We will declare the two different namespaces and prefix fname
and lname appropriately. Thus, the instance document is:
Helen
Jones
Well, I am getting tired of writing. Hopefully this makes sense. Even
more, hopefully it is correct. Comments? /Roger
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From Sophie.Mabilat at apitech.fr Tue Jan 4 14:23:28 2000
From: Sophie.Mabilat at apitech.fr (Sophie MABILAT)
Date: Mon Jun 7 17:18:59 2004
Subject: SAX ?
Message-ID:
Could anyone explain me what is SAX ?
Thanks.
S. MABILAT
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From schnitz at overflow.de Tue Jan 4 14:40:41 2000
From: schnitz at overflow.de (schnitz@overflow.de)
Date: Mon Jun 7 17:18:59 2004
Subject: Wish lists for the Holidays
Message-ID: <200001041426.SAA17733@jazz.seychelles.net>
> At 04:31 PM 12/24/99 -0800, Don Park wrote:
> >Atomic XML standards are one page specs each of which defines
> >a single 'power word', a tag name or an attribute name. An
> >example is 'xmlns' or 'table'.
> >
> >Molecular XML standards are small specs each of which defines
> >a single 'power phrase', a micro-schema involving just a few
> >elements. An example is 'address' molecule that consists of
> >small number of elements that make up an address.
> >
> >These 'micro-standards' will allow us to create a more coherent
> >XML document standards as well as XML software that can 'learn'
> >to handle new standards by plugging in new power words or phrases.
>
> This is beautiful! I'd love to see more projects that assemble smaller
> pieces, rather than trying to create anew within gigantic frameworks.
Fortunately, we won't have to wait too long to see this happen.
At least for the world of XHTML, this is already happening. It is exactly
this kind of thinking that led to the Modularization of XHTML. A "molecule" is
here called "module" consisting of a small, atomic logical entity like a
single tag or a set of inter-related tags, together with a micro-DTD
and later with a micro-schema. The "table" module is already there!
Everyone can create new modules, and all the modules can be combined
like plug and play to create custom document types tailored to the
specific needs of an individual, community or industry.
Regards,
Sebastian Schnitzenbaumer
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From anujag at roguewave.com Tue Jan 4 15:20:29 2000
From: anujag at roguewave.com (Anuja Gokhale)
Date: Mon Jun 7 17:18:59 2004
Subject: indexing xml documents..
Message-ID: <9B164B713EE9D211B6DC0090273CEEA915E651@bos1.noblenet.com>
Is there a reasonable tool out there that will index xml documents from a
file system (not the WWW) and allow me to input an xml document (or a
template) or specify a query that will search all the xml documents in the
directory for documents satisfying a particular XQL query ?
thanx
anuja
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Tue Jan 4 16:14:21 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:18:59 2004
Subject: Round 2: How an XML instance document references an XML Schema
In-Reply-To: "Roger L. Costello"'s message of "Tue, 04 Jan 2000 09:22:49 -0500"
References: <38720239.481577DF@mitre.org>
Message-ID:
I believe all Roger's examples are correct.
I would only add that his assertions about what will and will not be
schema-validated in each case assume that no additional information
about schemas and namespaces will be available to the schema-validator
beyond what is shown in the example instance documents.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From haustein at ls8.cs.uni-dortmund.de Tue Jan 4 16:23:45 2000
From: haustein at ls8.cs.uni-dortmund.de (Stefan Haustein)
Date: Mon Jun 7 17:18:59 2004
Subject: sax2: cdata, characters and ignorable whitespace
References: <3871EE6B.66DB1DC4@ls8.cs.uni-dortmund.de>
Message-ID: <38721E6D.AE88C135@ls8.cs.uni-dortmund.de>
David Megginson wrote:
> > void characters (int type, char [] characters, int start, int length);
> >
> > The value of the type parameter is one of
> > the integer constants IGNORABLE_WHITESPACE,
> > CHARACTERS, or CDATA.
>
> It has two major disadvantages:
>
> 1. Characters in CDATA really are normal characters in the XML
> definition, and the fact that they're in a CDATA section is just
> noise for most apps (and doesn't belong in the core
> DocumentHandler).
>
> 2. People who do care about CDATA sections might be unhappy to have
> two consecutive CDATA sections collapsed into one.
I am not really convinced: 1. Reporting the CDATA int does not
hurt anybody who is not interested. 2. People also might be unhappy
if they do not know if " or ' was used as quote for attributes.
OK, I see that each option has several advantages and
disadvantages. In the end, it's ok to me to take some extra effort if
I want to write the "same" document back from sax2 events.
Best regards
Stefan
--
Stefan Haustein
University of Dortmund
Computer Science VIII
www-ai.cs.uni-dortmund.de
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From haustein at ls8.cs.uni-dortmund.de Tue Jan 4 16:43:10 2000
From: haustein at ls8.cs.uni-dortmund.de (Stefan Haustein)
Date: Mon Jun 7 17:18:59 2004
Subject: SAX2: AttributeList ?!?
Message-ID: <387222F8.D09C6BC0@ls8.cs.uni-dortmund.de>
Am I the only one having problems with search methods
public String getType (String name);
public String getValue (String name);
for prefixed names in the SAX2 AttributeList? Do they
only work when prefixes are swithed on in the parser?
If prefixes are switched on in the parser, are also
the unprefixed names stored in the attribute list for
the namespace aware access methods? Or do the
namespace aware search methods cut off the prefix
while searching? Does the attributeList know if
prefixes are switched on?
To me, the prefix switching option seems
confusing, especially in connection with the
AttributeList. Meanwhile, I would prefer Richard
Anderson's proposal always delivering the prefix
in startElement, and add similar support to the
attributeList.
In my opinion, when getValue with a single
parameter is included in the AttributeList, it
should be a convenience method that defaults
to the namespace of the element.
Best regards
Stefan
--
Stefan Haustein
University of Dortmund
Computer Science VIII
www-ai.cs.uni-dortmund.de
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Tue Jan 4 16:48:59 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:18:59 2004
Subject: locally scoped element decls and namespaces
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08> <38710A38.D00352B8@mitre.org>
Message-ID: <38722573.6A2CBC3A@mecomnet.de>
Henry S. Thompson wrote:
>
> [...]
>
> We don't yet have a concrete syntax for indicating an association
> between "no namespace" and a schema in xsi:schemaLocation.
Wait. Is this really saying that one is looking for a way to encode the
specification, that a symbol, so encoded as to denote that it is in no
namespace, is really to be taken to be identical with another symbol, so
encoded as to denote that it is in another, definite namespace?
Isn't this impossible by definition?
> need to fill this gap. The locally-scoped element declaration issue
> doesn't arise in this case, or rather both interpretations give the
> same answer.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Tue Jan 4 16:57:18 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:18:59 2004
Subject: Unicode confusion
References: <8725685B.0081274E.00@d53mta03h.boulder.ibm.com>
Message-ID: <38722643.DF68B9F1@pacbell.net>
David Megginson wrote:
>
> roddey@us.ibm.com writes:
>
> > If anything, it should go the other way. Unicode should be the core
> > API, and there should be helper API to allow the use of local code
> > page chars where necessary. Everything should be set up to optimize
> > use of the Unicode API, with local code page use paying the price,
> > since Unicode is the more desireable format.
I took that as referring to 16-bit character codes vs variable width
or 32-bit ones. And when I take it that way, I agree! (However, the
notion of a "Unicode API" struck me as strange; the spec has no API.)
> No one's disagreeing with the use of Unicode; we're talking about
> which character encoding we'll use to represent it. You can represent
> Unicode in variable-width 8-bit or 16-bit encodings or in fixed-width
> 32-bit encodings.
>
> Note that Java uses UTF-16, which isn't quite fixed-width, though no
> one really notices.
... no one really notices "yet"! Unicode is still rolling out, in the
big picture, and most people now using it have little reason to notice.
One way that UTF-16 (and Unicode) aren't fixed width is that there
can exist "surrogate pairs", where two 16-bit values get combined to
represent a character in a range that can't be represented by 16-bits.
(For those that didn't know that!) It's the existence of such pairs
which makes some folk argue that a 32-bit character code is the way to
go (and they persuaded most SysV UNIX platforms to put a 32-bit wchar_t
in their ABI, accordingly).
However, another way they aren't fixed width is that "combining"
characters get used. Things like diacritical marks aren't always
part of the characters. In my book, the additional existence of
such features means there's no point in a 32-bit character code,
since even apps using a full ISO-10646 encoding (32-bit) still need
to deal with such issues.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From john.aldridge at informatix.co.uk Tue Jan 4 17:13:34 2000
From: john.aldridge at informatix.co.uk (John Aldridge)
Date: Mon Jun 7 17:18:59 2004
Subject: Request for Discussion: SAX 1.0 in C++
In-Reply-To:
References:
<3.0.6.32.19991214125527.00940150@mailhost>
<8725684D.0069ECEC.00@d53mta03h.boulder.ibm.com>
Message-ID: <3.0.6.32.20000104171300.00b8a610@mailhost>
At 08:40 21/12/99 +0100, you wrote:
>>>>>> roddey@us.ibm.com:
>
>> John is absolutely correct. It *must* be wchar_t if its going to be
>> a fixed thing.
>
>Please note that John was advocating std::wstring, rather than
>std::wchar_t*.
Er, sort of. I _do_ advocate std::wstring, but that's independent of the
point I was making here. I can live with wchar_t* if the consensus is that
std::wstring is either too slow or too poorly supported.
What I'd find difficult is a typedef SAXChar which could be "unsigned
short", because that would be a real bore to code to.
std::basic_string would be just as bad.
--
Cheers,
John
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Tue Jan 4 17:44:28 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:18:59 2004
Subject: locally scoped element decls and namespaces
In-Reply-To: james anderson's message of "Tue, 04 Jan 2000 17:53:07 +0100"
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08> <38710A38.D00352B8@mitre.org> <38722573.6A2CBC3A@mecomnet.de>
Message-ID:
james anderson writes:
> Henry S. Thompson wrote:
> >
> > [...]
> >
> > We don't yet have a concrete syntax for indicating an association
> > between "no namespace" and a schema in xsi:schemaLocation.
>
> Wait. Is this really saying that one is looking for a way to encode the
> specification, that a symbol, so encoded as to denote that it is in no
> namespace, is really to be taken to be identical with another symbol, so
> encoded as to denote that it is in another, definite namespace?
> Isn't this impossible by definition?
I think you've misunderstood my (admittedly obscure) point. Suppose I
have an XML instance document with no namespace declarations of any
kind governing some or all of the GIs therein. These GIs are not in
any namespace at all. The Namespace REC even gives us a way of
EXPLICITLY indicating that names in a certain scope are in no
namespace, namely "xmlns=''". But I may perfectly well want to
identify a schema to use for schema-validating such an instance
document. How do I do so? xsi:schemaLocation uses PAIRS of URIs to
accomplish this, with the first member of each pair being a namespace
URI. But _ex hypothesi_ the GIs of the elements in question are not
in a namespace, hence there is no namespace URI I can use in
xsi:schemaLocation. If we stay with the admittedly rather clunky
syntax of xsi:schemaLocation as it stands, I expect we'll nominate
something such as ##noNamespace for this purpose. . .
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dwshin at nlm.nih.gov Tue Jan 4 18:21:44 2000
From: dwshin at nlm.nih.gov (Dongwook Shin)
Date: Mon Jun 7 17:18:59 2004
Subject: indexing xml documents..
References: <9B164B713EE9D211B6DC0090273CEEA915E651@bos1.noblenet.com>
Message-ID: <38723BDB.4AEFE84A@nlm.nih.gov>
Anuja:
There are a couple of tools that index XML documents and serves
XQL queries.
1. XML Query Engine (http://www.fatdog.com)
It creates in-memory indexes for XML documents and serves XQL queries.
Query evaluation is reasonably fast for small to medium sized documents.
2. GMD-IPSI XQL Engine (http://xml.darmstadt.gmd.de/xql/)
It creates PDOM for XML documents and evaluates XQL queries.
I know a site that serves a collection of XML documents with this
engine, but is not satisfied with the querying performance.
3. My tool, XRS (http://dlb2.nlm.nih.gov/~dwshin/xrs.html) creates
inverted index into UNIX files and serves my own queries fast.
But it does not support XQL queries yet.
Dongwook
Anuja Gokhale wrote:
> Is there a reasonable tool out there that will index xml documents from a
> file system (not the WWW) and allow me to input an xml document (or a
> template) or specify a query that will search all the xml documents in the
> directory for documents satisfying a particular XQL query ?
>
> thanx
> anuja
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From john.aldridge at informatix.co.uk Tue Jan 4 18:23:31 2000
From: john.aldridge at informatix.co.uk (John Aldridge)
Date: Mon Jun 7 17:18:59 2004
Subject: SAX2 Namespace Support
In-Reply-To: <14430.46481.974707.922192@localhost.localdomain>
Message-ID: <3.0.6.32.20000104182250.009d3590@mailhost>
At 18:02 20/12/99 -0500, David Megginson wrote:
:
> public void startElement (String ns, String name,
> AttributeList atts)
> throws SAXException;
:
I appreciate this is probably a done deal by now, but I prefer:
class QName {
public:
wstring ns () const; // http://www.w3c.org/1999/xhtml
wstring name () const; // p
wstring nsPrefix () const; // html
wstring prefixedName () const; // html:p
bool operator== (const QName &rhs) const;
// ns & name both equal
private:
// Probably just a simple pointer to your internal data structures
};
void startElement (const QName &name, const AttributeList &atts)
throws SAXException;
You can also provide a specialisation for class std::less, and then
QNames become directly usable with the STL set/map classes.
Hiding the internals lets you use some cleverer comparison techniques, too,
so that, e.g.
if (qn1 == qn2) ...
can happen faster than doing the various string comparisons.
N.B. the code above is phrased assuming the use of wstring for string data,
because I prefer it, but could readily be adapted to raw wchar_t*, or
SAXChar, or whatever comes out of the other debate)
--
Cheers,
John
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From andrewl at microsoft.com Tue Jan 4 18:21:28 2000
From: andrewl at microsoft.com (Andrew Layman)
Date: Mon Jun 7 17:18:59 2004
Subject: locally scoped element decls and namespaces
Message-ID: <33D189919E89D311814C00805F1991F7F4AB1B@RED-MSG-08>
Henry Thompson correctly points out that I mistakenly described the
treatement of unqualified elements and namespaces to be a resolved issue.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From l-arcini at uniandes.edu.co Tue Jan 4 18:40:58 2000
From: l-arcini at uniandes.edu.co (Fabio Arciniegas A.)
Date: Mon Jun 7 17:19:00 2004
Subject: unicode confusion
Message-ID:
> Note that Java uses UTF-16, which isn't quite fixed-width, though no
> one really notices.
Err... David, I thought Java used UTF-8, actually a version slightly
different from the "typical" version that expresses:
Characters in the range \u0001 to \u007F in one byte: 0[bits 0-6]
Characters in the range \u0080 to \u07FF and \u0000 in two bytes:
110[bits 7 -10] 10[bits 0-6]
Characters in the range \u0800 to \uFFFF in three bytes: 1110[bits 12-15]
10[bits 6-11] 10[bits 0-5]
(what's different from typical is that NULL is in two bytes, so there's no
embedded nulls in java vm strings)
....
However, It has been quite a while since the last time I looked... Have
this changed in latest versions?
Best,
Fabio
--
Fabio Arciniegas A. Viaduct Technologies, Inc.
fabio@viaduct.com Software Engineer
Interests: XML, Wittgenstein and just about everything in between.
Oblique Strategy of the day: "Abandon normal instruments"
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tbray at textuality.com Tue Jan 4 19:07:04 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:00 2004
Subject: unicode confusion
Message-ID: <3.0.32.20000104110722.01456bc0@pop.intergate.ca>
At 01:37 PM 1/4/00 -0500, Fabio Arciniegas A. wrote:
>
>> Note that Java uses UTF-16, which isn't quite fixed-width, though no
>> one really notices.
>
>Err... David, I thought Java used UTF-8, actually a version slightly
>different from the "typical" version that expresses:
Java has come with a succession of library classes that advertised
UTF-8 support; the first few iterations were so hopelessly broken that I
gave up on them, but I've been told that recent versions are verging
on usable.
What David was saying is that in Java, the basic "char" data type
is 16 bits, and thus is naturally used to hold UTF-16-encoded text. I
have no idea if the library classes do the right things with UTF-16
surrogate pairs either in String or char[] contexts, but my experience
with String processing in Java is that it's often best just to ignore
those libraries anyhow and roll your own. -Tim
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dpotter at mitre.org Tue Jan 4 19:15:34 2000
From: dpotter at mitre.org (Daniel Potter)
Date: Mon Jun 7 17:19:00 2004
Subject: ANN: XML Schema Regular Expression Parser
Message-ID: <38724743.98E92111@mitre.org>
A working model of a regular expression parser designed to parse and
match strings based on the current XML Schema pattern definition is now
available at . This is a Java applet
(Java 1.1) and will require a Java enabled browser. It is still
currently a test, meaning that there are still bugs which have yet to be
fixed or even found.
Keep in mind the differences between regular expressions used in Perl
and regular expressions used to specify patterns in the XML Schema spec!
For example, the non-greedy operators aren't used (*?, +?);
backreferencing (\1) is unavailable, and others.
However, one known lacking feature is the \p{xx} forms. Although the
parser will recognize \p (or \P) it will ignore it and move on, causing
the {xx} after it to be parsed, interpretting it as an {m,n} form. This
in most cases will cause an error.
The source code is currently not available for general download, but
anyone interested can e-mail me ().
Try it out and see what you think! Please send me any bugs that you
discover. Thanks.
- Dan Potter
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ssdhanoa at us.ibm.com Tue Jan 4 19:19:27 2000
From: ssdhanoa at us.ibm.com (ssdhanoa@us.ibm.com)
Date: Mon Jun 7 17:19:00 2004
Subject: XML4C++ 3.0.1 & XML Lightweight Extractor
Message-ID: <8725685C.006A1C04.00@d53mta02h.boulder.ibm.com>
Writing a data type checking XML parser with Xerces
----------------------------------------------------------------------------
Data type checking -- one of the most eagerly awaited
W3C Schema features -- is now available with the Apache XML
project's Xerces parser. Learn how to put this parser to work in
your XML Java applications.
http://www-4.ibm.com/software/developer/library/xerces.html?open&loc=136,t=g,p=C++1
Code XML data islands in Web pages
---------------------------------------------------------
Author Carol Jones shows you how to break away from
straight HTML by using Java Server Pages to insert
islands of XML data into your Web pages.
http://www-4.ibm.com/software/developer/library/dataislands?open&loc=136,t=g,p=C++1
New Technology from alphaWorks
XML Lightweight Extractor
The XML access service Lightweight Extractor (XLE) extracts data from the
database, and converts and assembles the data into XML documents.
Download
http://www.alphaworks.ibm.com/tech/xle?open&l=xml-dev,t=xmle1
Updated Technology from alphaWorks
XML for C++ Version 3.0.1
IBM's XML for C++ parser (XML4C) is a validating XML parser written in a
portable subset of C++.
Update / New Features
New update for XML4C++ Version 3.0.1 contains Port to Solaris and
DOMMemTest added.
Download
Http://www.alphaworks.ibm.com/tech/xml4c?open&l=xml-dev,t=xm4c2
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From pandeng at telepath.com Tue Jan 4 19:25:43 2000
From: pandeng at telepath.com (Steve Schafer)
Date: Mon Jun 7 17:19:00 2004
Subject: unicode confusion
In-Reply-To:
References:
Message-ID: <66i47ss2m9a0hsfd6f9e2j49bibkd1vdr2@4ax.com>
On Tue, 4 Jan 2000 13:37:45 -0500 (GMT+5), "Fabio Arciniegas A."
wrote:
>Err... David, I thought Java used UTF-8, actually a version slightly
>different from the "typical" version that expresses:
>Characters in the range \u0001 to \u007F in one byte: 0[bits 0-6]
>Characters in the range \u0080 to \u07FF and \u0000 in two bytes:
>110[bits 7 -10] 10[bits 0-6]
>Characters in the range \u0800 to \uFFFF in three bytes: 1110[bits 12-15]
>10[bits 6-11] 10[bits 0-5]
I think he's talking about the _internal_ character format, which is
indeed UTF-16 (without the surrogates).
-Steve Schafer
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From housel at home.com Tue Jan 4 20:02:47 2000
From: housel at home.com (Peter S. Housel)
Date: Mon Jun 7 17:19:00 2004
Subject: Unicode confusion
References: <8725685B.0081274E.00@d53mta03h.boulder.ibm.com>
Message-ID: <00c601bf56ee$a076ab00$55f9989d@nb.conexant.com>
> No one's disagreeing with the use of Unicode; we're talking about
> which character encoding we'll use to represent it. You can represent
> Unicode in variable-width 8-bit or 16-bit encodings or in fixed-width
> 32-bit encodings.
My reading of the Unicode 2.x standard is that the above isn't strictly
correct. It is correct if you change "Unicode" to "the ISO 10646 Universal
Character Set" though.
> Note that Java uses UTF-16, which isn't quite fixed-width, though no
> one really notices.
It seems to me that Java uses Unicode, which maintains the semantics that 16
bits equals one character. Surrogates are characters in Unicode, whereas
those code points are not legal UCS characters, but only artifacts of the
UTF-16 encoding.
Unicode looks like UTF-16, but the semantics are slightly different. So a
file using UTF-16 encoding containing a single "astral plane" character of
the UCS would be interpreted by Unicode as a file containing *two* surrogate
characters. (I think it's a strange tack to take, but it seems fairly clear
to me that this was their position as of Unicode 2.x. I haven't looked at
3.0 yet, so things may have changed since then.)
The XML character set is the UCS, not Unicode.
Cheers,
-Peter- housel@acm.org
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Tue Jan 4 20:06:37 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:19:00 2004
Subject: locally scoped element decls and namespaces
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08> <38710A38.D00352B8@mitre.org> <38722573.6A2CBC3A@mecomnet.de>
Message-ID: <3872540A.EF267665@mecomnet.de>
Henry S. Thompson wrote:
>
> james anderson writes:
>
> >
> > Wait. Is this really saying that one is looking for a way to encode the
> > specification, that a symbol, so encoded as to denote that it is in no
> > namespace, is really to be taken to be identical with another symbol, so
> > encoded as to denote that it is in another, definite namespace?
> > Isn't this impossible by definition?
>
> I think you've misunderstood my (admittedly obscure) point.
No, I think that I understood you. I still understand you. The point is not at
all obscure. It turns out to be one of the disagreeable aspects of the
namespace spec should one try to implement a processor with a complete model
for names.
I could have either followed the spec strictly and left such names uninterned,
or I could have interned them in some "special" namespace. Given the
premonition, that situations such this would be bound to arise, I opted for
the second. As the spec says little about how names are to be processed, one
might say that I had little to go on. Much as you predict, I did what i
suppose was intended but I would note that this option is, strictly speaking,
in contradiction with the little which spec does say. Should it be what the
spec intends, then the wording should be appropriately revised to recognize
existance of a specially designated default namespace.
> Suppose I
> have an XML instance document with no namespace declarations of any
> kind governing some or all of the GIs therein. These GIs are not in
> any namespace at all. The Namespace REC even gives us a way of
> EXPLICITLY indicating that names in a certain scope are in no
> namespace, namely "xmlns=''". But I may perfectly well want to
> identify a schema to use for schema-validating such an instance
> document. How do I do so?
Whatever notational tricks you have up your sleve, the question remains, how
do you take these names which are "not in any namespace at all" and postfacto
put them in one? I mean, if they're not in one, how do you find them to
operate on them?
> xsi:schemaLocation uses PAIRS of URIs to
> accomplish this, with the first member of each pair being a namespace
> URI. But _ex hypothesi_ the GIs of the elements in question are not
> in a namespace, hence there is no namespace URI I can use in
> xsi:schemaLocation. If we stay with the admittedly rather clunky
> syntax of xsi:schemaLocation as it stands, I expect we'll nominate
> something such as ##noNamespace for this purpose. . .
Thus the notion of the specially designated namespace. Sneaking it in the back
door is a bad idea.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Tue Jan 4 20:57:36 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:00 2004
Subject: locally scoped element decls and namespaces
In-Reply-To: james anderson's message of "Tue, 04 Jan 2000 21:11:54 +0100"
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08> <38710A38.D00352B8@mitre.org> <38722573.6A2CBC3A@mecomnet.de> <3872540A.EF267665@mecomnet.de>
Message-ID:
There's an implication of your approach which I think I want to
disagree with, namely that two documents each with no namespace
declarations at all ipso facto put their GIs in the SAME, default
[your word] namespace. I don't read the namespace REC as allowing
this inference. It says they are in no namespace, and I think we
should respect that. There's nothing in what I wrote (or I didn't
intend there to be) which licenses the inference that by
'##noNamespace' I mean to provide a namespace URI for the universal
default namespace -- I quite specifically do NOT mean that, but rather
to shoehorn into the xsi:schemaLocation syntax a way of saying that
the schema which provides constraints for the names in this document
which are in no namespace can be found . . .
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From lauren at sqwest.bc.ca Tue Jan 4 22:48:44 2000
From: lauren at sqwest.bc.ca (Lauren Wood)
Date: Mon Jun 7 17:19:00 2004
Subject: Xpath and DOM
In-Reply-To: <199912262110.OAA02868@localhost.localdomain>
References: Your message of "Fri, 17 Dec 1999 09:50:27 GMT." <000901bf4874$257e3ea0$ab20268a@pc-lrd.bath.ac.uk>
Message-ID: <200001042242.OAA14704@mail.sqwest.bc.ca>
On 26 Dec 99, at 14:10, uche.ogbuji@fourthought.com wrote:
> > Hmm, I'd suggest:
> >
> > interface QueryFactory {
> >
> > DocumentQuery getDocumentQuery(String queryType);
> > }
> >
> > And have the query type, "xpath" or "xsql" passed in to the
> > factory method. Solves the plugging in of new query types, and
> > avoids having to prepend the query string with "xpath:" or whatever.
>
> This is a _very_ astute idea, and a much more sensible way to partition the
> problem-spaces.
>
> Mrs. Wood and co., are you listening?
Yes, this seems like a good idea to discuss. I'll raise it.
BTW, it does help to discuss these things on the www-
dom@w3.org mailing list as well; that way everyone who's
interested in the DOM can take part (I know some people who
aren't subscribed to xml-dev because of the volume of email, but
are subscribed to www-dom@w3.org).
thanks,
Lauren
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From rhanson at blast.net Tue Jan 4 23:04:21 2000
From: rhanson at blast.net (Robert Hanson)
Date: Mon Jun 7 17:19:00 2004
Subject: Help needed with the XPointer spec
References: <33D189919E89D311814C00805F1991F7F4AB0A@RED-MSG-08> <38710A38.D00352B8@mitre.org> <38722573.6A2CBC3A@mecomnet.de> <3872540A.EF267665@mecomnet.de>
Message-ID: <03bb01bf5706$ef05d3a0$0cb919ce@INTERNETDEPT>
I ran across a definition in the XPointer spec which seems a little odd to
me...
[Definition:] When the container node of a point is of a node type that cannot
have child nodes, then the index is an index into the characters of the
string-value of the node; such a point is called a character-point.
And before this it states the definition of a "node-point". But my question
is, if a node-point is "When the container node of a point is of a node type
that can have child nodes", and a character-point is "When the container node
of a point is of a node type that cannot have child nodes", then what about
characters in a node that CAN have child nodes? It seems that by definition
that this is not defined.
Am I just being to picky about the given definition?
...And could someone give me an example of an XPointer that would fall after
the "H" in this XML instance below? And another which would fall after the
first "bar" element, and before the second?
HelloGoodbyeStuff
Thanks,
Robert
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Tue Jan 4 23:45:01 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:19:00 2004
Subject: SAX2 Namespace Support
In-Reply-To: John Aldridge's message of "Tue, 04 Jan 2000 18:22:50 +0000"
References: <3.0.6.32.20000104182250.009d3590@mailhost>
Message-ID:
John Aldridge writes:
> I appreciate this is probably a done deal by now, but I prefer:
>
> class QName {
> public:
> wstring ns () const; // http://www.w3c.org/1999/xhtml
> wstring name () const; // p
> wstring nsPrefix () const; // html
> wstring prefixedName () const; // html:p
>
> bool operator== (const QName &rhs) const;
> // ns & name both equal
> private:
> // Probably just a simple pointer to your internal data structures
> };
My biggest problem with this (and its Java equivalent) is figuring out
how to handle equality: are two QNames with the same URI part and same
local part equal? What if the prefix is different?
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tmmet at hotmail.com Wed Jan 5 02:46:51 2000
From: tmmet at hotmail.com (tmmet tvp)
Date: Mon Jun 7 17:19:00 2004
Subject: Filter by keyword.....
Message-ID: <20000105024616.44627.qmail@hotmail.com>
Hi,
Can anyone help me out...
My XML file is as follows...
In my edit control,if I type/enter,"God",
I should be able to filter/get the node..That is,
To filter by exact value,we use,
CHAPTER[SUBCHAPTER/@Title = "God knows"]
But,how can i do this for keyword...How do I specify in my key condition...
Any ideas/suggestions will be greatly helpful to me...
Thanks in advance.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From fscheng at netzero.net Wed Jan 5 05:04:28 2000
From: fscheng at netzero.net (Franklin Cheng)
Date: Mon Jun 7 17:19:00 2004
Subject: unsubscribe
References: <916BA3451A99D2118FCC0090272ABD2F031073C9@CAXIXI>
Message-ID: <000f01bf573a$58a96780$e2eff5d1@pennycall.com>
unsubscribe
__________________________________________
NetZero - Defenders of the Free World
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From d.d.barnes at ic.ac.uk Wed Jan 5 10:42:42 2000
From: d.d.barnes at ic.ac.uk (ic\ddsb/d.d.barnes)
Date: Mon Jun 7 17:19:00 2004
Subject: using xt in a webpage
Message-ID: <3873200D.FE8D0EE5@ic.ac.uk>
Hello and Happy New Year,
Could anyone point-me-to-a/send-me-some html code that uses xt in some
JAVA script to transform a given xml file with a given xsl file?
I would be exceedingly grateful.
Thanks in advance,
David
PS if not xt then perhaps another java-based xslt-er?
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ldodds at ingenta.com Wed Jan 5 10:51:55 2000
From: ldodds at ingenta.com (Leigh Dodds)
Date: Mon Jun 7 17:19:00 2004
Subject: SAX2 Namespace Support
In-Reply-To:
Message-ID: <000601bf576a$dc1cfb60$ab20268a@pc-lrd.bath.ac.uk>
> My biggest problem with this (and its Java equivalent) is figuring out
> how to handle equality: are two QNames with the same URI part and same
> local part equal? What if the prefix is different?
I take it that its the latter question which is the thorny one:
If the URI and the local part are the same, then two QNames are
identical.
If the prefix is different (but the URI is the same) then they
should still be equal. The prefix is a means to point to a URI.
The URIs are identical, therefore the QNames should be the
same. The prefix is there to cope with the fact that a URI can
contain characters illegal in a Name, and nothing more - its
a pointer.
If I'm wrong, and they're not equal in the latter case, then
its highly counter-intuitive. And it also devalues the idea
of having URIs in the first place.
If the prefix has meaning, then let it denote the namespace completely,
without reference to a URI. If its a pointer then it should be
dereferenced and have no intrinsic value.
What would be the value in doing the following?:
me@myorg.com
me
In terms of SAX2, reporting the prefix is obviously useful for
round-trip processing.
L.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From john.aldridge at informatix.co.uk Wed Jan 5 11:22:24 2000
From: john.aldridge at informatix.co.uk (John Aldridge)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
In-Reply-To:
References:
<3.0.6.32.20000104182250.009d3590@mailhost>
Message-ID: <3.0.6.32.20000105112151.00bb7820@mailhost>
At 16:28 04/01/00 -0500, David Megginson wrote:
>John Aldridge writes:
>
>> class QName {
>> public:
>> wstring ns () const; // http://www.w3c.org/1999/xhtml
>> wstring name () const; // p
>> wstring nsPrefix () const; // html
>> wstring prefixedName () const; // html:p
>>
>> bool operator== (const QName &rhs) const;
>> // ns & name both equal
>> private:
>> // Probably just a simple pointer to your internal data structures
>> };
>
>My biggest problem with this (and its Java equivalent) is figuring out
>how to handle equality: are two QNames with the same URI part and same
>local part equal? What if the prefix is different?
I'm sorry, I don't see the problem. The QNames are equal if ns() and
name() both match. The prefix is irrelevant. This is what I suggested in
my definition of the equality operator above.
if (qn1 == qn2) ...
just does the right thing. If some application really wants to compare the
prefixed name, it can always write:
if (qn1.prefixedName () == qn2.prefixedName ()) ...
I'm obviously missing something, since you and other knowledgable people
don't regard this as self evidently obvious -- can you explain the problem
to me, please?
--
Cheers,
John
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Wed Jan 5 11:31:18 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost>
Message-ID: <38732CCA.8FD84180@mecomnet.de>
what if the application gets to specify the implementation for EQ on names?
eg., by choosing the implementation for the name class. perhaps indirectly by
virtue of the setting for the namespace-support property.
where namespaces are to be observed, then the prefix is immaterial. where they
are not to be observed, then the url is immaterial.
David Megginson wrote:
>
> John Aldridge writes:
>
> > I appreciate this is probably a done deal by now, but I prefer:
> >
> > class QName {
> > public:
> > wstring ns () const; // http://www.w3c.org/1999/xhtml
> > wstring name () const; // p
> > wstring nsPrefix () const; // html
> > wstring prefixedName () const; // html:p
> >
> > bool operator== (const QName &rhs) const;
> > // ns & name both equal
> > private:
> > // Probably just a simple pointer to your internal data structures
> > };
>
> My biggest problem with this (and its Java equivalent) is figuring out
> how to handle equality: are two QNames with the same URI part and same
> local part equal? What if the prefix is different?
>
> All the best,
>
> David
>
> --
> David Megginson david@megginson.com
> http://www.megginson.com/
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From msabin at cromwellmedia.co.uk Wed Jan 5 11:51:46 2000
From: msabin at cromwellmedia.co.uk (Miles Sabin)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2: Parser interface
Message-ID:
David Megginson wrote,
> Miles Sabin writes:
> > [snip: query about Parser.setLocale()]
>
> Error reporting.
OK, I've slept on this and, although I can see there's a case
to be made for it, I'm not convinced.
Many software modules need to do error reporting of some sort
or another. Typically they'll simply use the platform default
Locale for localization rather than allowing it to be
configurable. That's the right thing to do, because error
messages are normally delivered locally, and the rare cases
where they're not aren't enough to justify adding setLocale()
methods to an interface (cp. pretty much all the standard
java.*.* classes, eg. java.util.HashMap).
I'm not convinced that an XML parser is special in this
respect, so I don't think org.xml.sax.Parser should have this
method. For the most part error messages will be delivered
locally, so the platform default Locale is fine. And in the
cases where error messages are delivered non-locally (ie.
an XML parser as part of a web application which delivers
errors to a remote user) the non-local Locale probably won't
be available _anyway_ ... we might have a character encoding
or language preference (via HTTP's Accept-Charset: and Accept-
Language:) but there's no defined mapping from those
preferences to a Locale. Worse still, there's no defined
mapping from a Locale to a preferred character encoding, so
a configured Locale wouldn't help all that much anyway.
Cheers,
Miles
--
Miles Sabin Cromwell Media
Internet Systems Architect 5/6 Glenthorne Mews
+44 (0)20 8817 4030 London, W6 0LJ, England
msabin@cromwellmedia.com http://www.cromwellmedia.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From davidc at nag.co.uk Wed Jan 5 13:42:12 2000
From: davidc at nag.co.uk (David Carlisle)
Date: Mon Jun 7 17:19:01 2004
Subject: Round 2: How an XML instance document references an XML Schema
Message-ID: <200001051337.NAA19504@nag.co.uk>
maybe this is a stupid question, but _why_ does
schemaLocation
take two URI ?
What is the point of the first one giving a namespace? It seems to be
one source of the complication, and currently I don't see how
it can be used.
After namespace processing the names in both the schema and the
document are all fully expanded to (uri,local-name) pairs, so it would
seem that the only question was whether these pairs matched and so I don't
see how the namespace URI in schemaLocation may be used. Having to have
a URI makes it difficult to refer to the unnamespaced case.
> A Schema-validating parser will use the URI to fetch the schema
> document, and then will verify that the targetNamespace value matches
> the namespace in schemaLocation.
Is this the _only_ use of the first URI, to generate an error if it is
incorrect?
David
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From pmalone2 at csc.com Wed Jan 5 14:12:02 2000
From: pmalone2 at csc.com (pmalone2@csc.com)
Date: Mon Jun 7 17:19:01 2004
Subject: To Oracle or NOT to Oracle
Message-ID: <8525685D.004DF0DF.00@csc.com>
Gentlemen,
I've been following this list for about two months now and can safely say
that I am a "beginner" at designing XML anythings. If I'm asking too basic a
question please don't hesitate to tell me, or steer me to someplace else better
suited .
My situation is this...the company that I work for wants a project done
in XML, it is not overly complicated, but it poses some problems for me. 1) They
want this project to be a "learning" project and for me to master XML (no
pressure!) so I can do more complex projects. 2) No one here knows anymore XML
than I do (which isn't alot) and nothing they have worked on has anything at all
to do with the way this project has to work.
Now, at this point I don't have much in the way of software for working
with XML although I have downloaded "ALOT" of demos that I thought would help.
But alas, most of them won't do the trick. Especially since I have to create
this project for the government and it will be residing on a Netscape Enterprise
Server.
I thought that it might be a big help to me if I could get a "complete"
set of XML tools with step by step instructions to walk me through some examples
of using XML from start to finish....maybe using a database (which would work
well for my first project), or something else. To date I've looked at
"Bluestones" Visual XML, and where that is a nice looking bit of fluff with a
great Java interface, it seems to require too much proprietary software (mainly
it's bluestone server) for me to use comfortably, and a few pieces of software
that they don't even make to run it (i.e. Xtrans). So, I look to Oracle 8i, and
it seems to have everything in it I need....but will it work well with Netscape
Enterprise Server???? I'm prepared to get this software (my company now uses
Oracle 7), but I need to make sure there are no exteme minuses for using this on
the Enterprise Server.
If Oracle isn't the answer...any suggestions???
I've tried getting books on XML, but most seem to base their examples on
using the Microsoft software that uses "data islands" which evidently I can't
use since I"m gonna be using the Enterprise Server......I have had Zero luck in
finding ANY helpful Developers books that give me the information I need. Any
suggestions here???? There do appear to be two books being published soon on
using XML with the Enterprise Server (I saw them on Amazon.com) but they aren't
available yet.
Any suggestions would be helpful at this time.....and if it isn't a
problem, in a future message, lay out what I'm trying to do (especially if
Oracle or Bluestone isn't what I want) and get some suggestions.
Thanks!!!! Pete Malone
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 14:25:13 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:01 2004
Subject: Round 2: How an XML instance document references an XML Schema
In-Reply-To: David Carlisle's message of "Wed, 5 Jan 2000 13:37:37 GMT"
References: <200001051337.NAA19504@nag.co.uk>
Message-ID:
David Carlisle writes:
> maybe this is a stupid question, but _why_ does
> schemaLocation
> take two URI ?
>
> What is the point of the first one giving a namespace? It seems to be
> one source of the complication, and currently I don't see how
> it can be used.
A single document may contain names from more than one namespace. So
although basically you're right, the pairing is primarily to provide a
minimal sanity-check that you're getting the schema you think you are,
this becomes more useful when you have several namespaces in your
document.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 14:28:39 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:01 2004
Subject: To Oracle or NOT to Oracle
References: <8525685D.004DF0DF.00@csc.com>
Message-ID: <387354F0.F4CB077C@algx.net>
pmalone2@csc.com wrote:
>
> Gentlemen,
> I've been following this list for about two months now and can safely say
> that I am a "beginner" at designing XML anythings. If I'm asking too basic a
> question please don't hesitate to tell me, or steer me to someplace else better
> suited .
> My situation is this...the company that I work for wants a project done
> in XML, it is not overly complicated, but it poses some problems for me. 1) They
> want this project to be a "learning" project and for me to master XML (no
> pressure!) so I can do more complex projects. 2) No one here knows anymore XML
> than I do (which isn't alot) and nothing they have worked on has anything at all
> to do with the way this project has to work.
> Now, at this point I don't have much in the way of software for working
> with XML although I have downloaded "ALOT" of demos that I thought would help.
> But alas, most of them won't do the trick. Especially since I have to create
> this project for the government and it will be residing on a Netscape Enterprise
> Server.
> I thought that it might be a big help to me if I could get a "complete"
> set of XML tools with step by step instructions to walk me through some examples
> of using XML from start to finish....maybe using a database (which would work
> well for my first project), or something else. To date I've looked at
> "Bluestones" Visual XML, and where that is a nice looking bit of fluff with a
> great Java interface, it seems to require too much proprietary software (mainly
> it's bluestone server) for me to use comfortably, and a few pieces of software
> that they don't even make to run it (i.e. Xtrans). So, I look to Oracle 8i, and
> it seems to have everything in it I need....but will it work well with Netscape
> Enterprise Server???? I'm prepared to get this software (my company now uses
> Oracle 7), but I need to make sure there are no exteme minuses for using this on
> the Enterprise Server.
Are you tryint to go with a pure XML solution, or are you looking at
using XML from, for example, a Java application? This makes a big
difference. I've been using Oracle for about 3 years now, and think as
a database they are absolutely the best. As for using their Java and/or
XML products, I'm not such a big fan. I would recommend more of a
"publishing framework" for what it sounds like you are doing, and of
course in that vein would recommend something I work on (*grin*), i.e.
Apache Cocoon. Cocoon lets you do some very nice things with XML, has a
SQLProcessor (as well as a new LDAPProcessor and some other nice hooks,
like XSP coming along). It also can let you learn, as using it with
static XML/XSL is a no-brainer, but as you get more comfortable with SAX
and DOM you can really jump right in.
As for working with NES, you will almost certainly have to have OAS
(Oracle App Server, sometimes called Oracle Web Server) to build a solid
n-tier environment. NES does _not_ happily talk directly to Oracle, as
it has no facility to. That's where a servlet engine/code comes into
play (and we're back to Cocoon again).
> If Oracle isn't the answer...any suggestions???
> I've tried getting books on XML, but most seem to base their examples on
> using the Microsoft software that uses "data islands" which evidently I can't
> use since I"m gonna be using the Enterprise Server......I have had Zero luck in
> finding ANY helpful Developers books that give me the information I need. Any
> suggestions here???? There do appear to be two books being published soon on
> using XML with the Enterprise Server (I saw them on Amazon.com) but they aren't
> available yet.
Well, you can buy mine when it comes out ;-) It's more on the Java side
of things though, so again I'm not sure if that's what you are looking
for.
-Brett
> Any suggestions would be helpful at this time.....and if it isn't a
> problem, in a future message, lay out what I'm trying to do (especially if
> Oracle or Bluestone isn't what I want) and get some suggestions.
> Thanks!!!! Pete Malone
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Wed Jan 5 14:33:20 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:19:01 2004
Subject: Namespaces and Validating XML Parsers Question
References: <33D189919E89D311814C00805F1991F7F4AB05@RED-MSG-08>
Message-ID: <38735771.DFD22886@mecomnet.de>
The question and the answer address separable issues. One is, as
Andrew Layman wrote:
>
> The namespaces specification does not provide any particular means to
> associate a namespace with any defining or collateral documents (e.g.
> schemas).
The other, in the
> -----Original Message-----
> From: Bruce D. Nilo [mailto:bruce@nilo.com]
>
is
> how a validating parser knows how to associate an element or
> attribute that is in a specific namespace with the elements and
> attributes of either an external or internal DTD reference.
Which is not that of how to "associate a schema with a namespace", but that of
how to associate names in a known DTD with namespaces specified in a known
document. They are often conflated. The work on schemas may eventually lead to
their simultaneous solution. This does not mean that they are the same.
The namespace REC specifies the first issue as outside of its scope and
"punts" on the second.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From davidc at nag.co.uk Wed Jan 5 14:47:00 2000
From: davidc at nag.co.uk (David Carlisle)
Date: Mon Jun 7 17:19:01 2004
Subject: Round 2: How an XML instance document references an XML Schema
In-Reply-To: (ht@cogsci.ed.ac.uk)
References: <200001051337.NAA19504@nag.co.uk>
Message-ID: <200001051442.OAA19572@nag.co.uk>
> A single document may contain names from more than one namespace.
yes of course.
> the pairing is primarily to provide a
> minimal sanity-check that you're getting the schema you think you are,
Hmm not convinced:-) I fear this has all the hallmarks of TeX's \outer:
an error catching device that has generated orders of magnitude
more errors than it ever caught.
If you didn't have to specify the namespace URI again here then you
could naturally specify schema on elements from the null namespace
just by pointing to a schema which defined rules for elements not in a
namespace. Because you do have to specify the namespace then you can't
do that without inventing some magic syntax, and also you have to enter
the (possibly long) namespace URI of the elements in the document twice
once for the namespace declaration and once for this error check.
I would guess that mostly a failure of this error check would be due to
mistyping the URI rather than _trying_ to access a schema for the wrong
namespace.
David
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Wed Jan 5 15:13:53 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
In-Reply-To: John Aldridge's message of "Wed, 05 Jan 2000 11:21:51 +0000"
References: <3.0.6.32.20000104182250.009d3590@mailhost> <3.0.6.32.20000105112151.00bb7820@mailhost>
Message-ID:
John Aldridge writes:
> I'm sorry, I don't see the problem. The QNames are equal if ns() and
> name() both match. The prefix is irrelevant. This is what I suggested in
> my definition of the equality operator above.
>
> if (qn1 == qn2) ...
>
> just does the right thing. If some application really wants to compare the
> prefixed name, it can always write:
>
> if (qn1.prefixedName () == qn2.prefixedName ()) ...
>
> I'm obviously missing something, since you and other knowledgable people
> don't regard this as self evidently obvious -- can you explain the problem
> to me, please?
In principle (the principle of least surprise), it's very bad
behaviour for two objects to be == in C++ or equals() in Java if any
of their publicly-accessible fields differ. Think of sets, for
example.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From jrgardn at emory.edu Wed Jan 5 15:11:19 2000
From: jrgardn at emory.edu (John Robert Gardner)
Date: Mon Jun 7 17:19:01 2004
Subject: To Oracle or NOT to Oracle
In-Reply-To: <8525685D.004DF0DF.00@csc.com>
Message-ID:
On Wed, 5 Jan 2000 pmalone2@csc.com wrote:
> My situation is this...the company that I work for wants a project done
> in XML, it is not overly complicated, but it poses some problems for me. 1) They
> If Oracle isn't the answer...any suggestions???
A great deal of the other possible suggestions has to do with the kind and
amounts of data you are working with also. I floated something of this to
the list a few months back (cf. archives October under subject: XML/Oracle
and consulting), and had some enlightening repsonses to which I hope to do
justice and add info from subsequent experience.
The most interesting suggestion was for an ODBS from RMIT called
Structured Information Manager (SIM). Again, not knowing your
requirements, it's hard to be sure this hits the mark, but I noted your
concern for proprietary limitations. In our project, archive and
source-to-client requisites of our grant necessitate non-proprietary
formats. SIM archives native SGML/XML, and allows multiple access shemas
via its logical views structure. Several reports on performance give it
the edge over other options, including those you're considering. If
you're into Z39.50, it's support in SIM is native, as is full unicode in
the recent release. XTech's XLink tool apparently works with it based on
early reports I've heard. For myself, I'm litterally _just_ beginning to
look into SIM, so for anything further on it, see the archives or
http://www.rmit.com.
Also as to Oracle 8i:
pmalone2@csc.com wrote:
As for working with NES, you will almost certainly have to have OAS
(Oracle App Server, sometimes called Oracle Web Server) to build a solid
n-tier environment. NES does _not_ happily talk directly to Oracle, as
it has no facility to. That's where a servlet engine/code comes into
play (and we're back to Cocoon again).
I would definitely agree on this. I think it was OAS 2.6 that our DBA was
was struggling with on our Enterprise 250, with Solaris 2.7. Stonebridge
consulting noted that this OAS is "formally" not compatible with 2.7,
though after some work-arounds, it functions. Our DBA also feels the the
Oracle JVM is a severe performance impediment . . . but I personally think
that's because he's not gotten XML religion yet -- he's e-commerce,
and we're heavily text-based with unbounded heirarchies. THus far, all
we've worked with are fairly shallow heirarchies, however, and he's just
using a sort of table-representing/pointing to-another-tree table or STAR
system.
Again, we're only just beginning to play with this as well, so we've not
really deployed the technet XML/XSL tools from Oracle yet. Steve Muench's
presentation at XML '99 was pretty convincing, however, and i'm sure he
will have something to say on all this.
good luck, however, in the quest
=-=-=-=-=-=-=-=-=-==-=-=-=
John Robert Gardner
ATLA-CERTR
Emory University
------------------------------------------------------------
http://vedavid.org/diss/
"If there is something you're thinking of doing, or wish you could do,
begin it. In boldness there is mystery and power . . . . " -Goethe
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From jrgardn at emory.edu Wed Jan 5 15:17:10 2000
From: jrgardn at emory.edu (John Robert Gardner)
Date: Mon Jun 7 17:19:01 2004
Subject: To Oracle or NOT to Oracle
In-Reply-To: <387354F0.F4CB077C@algx.net>
Message-ID:
Correction:
SIM URI:
http://www.mds.rmit.edu.au/
sorry,
jr
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ldodds at ingenta.com Wed Jan 5 15:47:15 2000
From: ldodds at ingenta.com (Leigh Dodds)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
In-Reply-To:
Message-ID: <000b01bf5794$1e83e580$ab20268a@pc-lrd.bath.ac.uk>
> In principle (the principle of least surprise), it's very bad
> behaviour for two objects to be == in C++ or equals() in Java if any
> of their publicly-accessible fields differ. Think of sets, for
> example.
In this instance though your level of surprise is going to relate
to how familiar you are with the Namespaces spec. After reading
it I'd be surprised if two QNames with the same URIs and same local
parts aren't the considered equal.
The problem though boils down to how often, in reality, XML instances
will have the same Namespace declared twice, with different prefixes.
I'd have thought this would be pretty unlikely. In a data interchange
context standardising prefixes for Namespaces would mitigate this
'problem' and would probably have beneficial side-effects as well.
In a document authoring context I can't imagine using the same
Namespace with two prefixes, except by accident. Readibility
(of the XML) is reduced with Namespaces anyway, sprinkling additional
prefixes around makes this worse.
2-penneth worth.
L.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Wed Jan 5 16:06:38 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:01 2004
Subject: To Oracle or NOT to Oracle
References: <8525685D.004DF0DF.00@csc.com>
Message-ID: <007901bf5797$914c05e0$de4c340c@odi.com>
Hi Pete,
I would be a very poor Object Design employee if I didn't mention that you
should at least look at Object Design's Excelon.
http://www.objectdesign.com/excelon/main.htm
It's very inexpensive compared to Oracle (although I don't know what kind of
price cuts they've just made), and very fast.
> I thought that it might be a big help to me if I could get a
"complete"set of XML tools with step by step instructions to walk me through
some examples of using XML from start to finish
Excelon is a complete environment, from an editing tool to a queryable data
repository. There is also an on line tutorial available, and it's very easy
to use.
> "Bluestones" Visual XML, and where that is a nice looking bit of fluff
with a great Java interface, it seems to require too much proprietary
software (mainly it's bluestone server) for me to use comfortably,
Excelon has Java, c++, COM, Corba and http interfaces available. (EJB
support will be here soon)
However, it does use ObjectStore, an ODBMS, but objectstore is transparent
to the developer, and you code to standards, not the proprietary software.
(Although, ObjectStore supports ODMG standards)
Remember, I am an employee of Object Design, so be skeptical of my claims,
but please download the product for free and check it out yourself.
Alan Santos
Senior Applications Engineer
Object Design, Inc
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From cox_andy at bah.com Wed Jan 5 16:34:12 2000
From: cox_andy at bah.com (Cox Andy)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
In-Reply-To: <000b01bf5794$1e83e580$ab20268a@pc-lrd.bath.ac.uk>
Message-ID: <002501bf579b$0630c4b0$20aa509c@bah.com>
The semantics of operator==() and equals() should match the concept that the
class represents.
If I understand the Namespaces spec [1] correctly, an identical URI (defined
in the spec as "exactly the same character-for-character") and an identical
local part imply an identical QName. According to the spec, "the prefix
functions only as a placeholder for a namespace name." [2]
The URI is the key. Even in the intro, the authors emphasize that the XML
version of namespaces "is not, mathematically speaking, a set."
One man's opinion...
Andy
[1] http://www.w3.org/TR/REC-xml-names/
[2] http://www.w3.org/TR/REC-xml-names/#ns-qualnames
| -----Original Message-----
| From: owner-xml-dev@ic.ac.uk [mailto:owner-xml-dev@ic.ac.uk]On Behalf Of
| Leigh Dodds
| Sent: Wednesday, 05 January 2000 10:47 AM
| To: David Megginson
| Cc: xml-dev
| Subject: RE: SAX2 Namespace Support
|
|
| > In principle (the principle of least surprise), it's very bad
| > behaviour for two objects to be == in C++ or equals() in Java if any
| > of their publicly-accessible fields differ. Think of sets, for
| > example.
|
| In this instance though your level of surprise is going to relate
| to how familiar you are with the Namespaces spec. After reading
| it I'd be surprised if two QNames with the same URIs and same local
| parts aren't the considered equal.
|
| The problem though boils down to how often, in reality, XML instances
| will have the same Namespace declared twice, with different prefixes.
|
| I'd have thought this would be pretty unlikely. In a data interchange
| context standardising prefixes for Namespaces would mitigate this
| 'problem' and would probably have beneficial side-effects as well.
|
| In a document authoring context I can't imagine using the same
| Namespace with two prefixes, except by accident. Readibility
| (of the XML) is reduced with Namespaces anyway, sprinkling additional
| prefixes around makes this worse.
|
| 2-penneth worth.
|
| L.
|
| xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
| Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on
| CD-ROM/ISBN 981-02-3594-1
| To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
| unsubscribe xml-dev
| To subscribe to the digests, mailto:majordomo@ic.ac.uk the
| following message;
| subscribe xml-dev-digest
| List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|
|
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From donpark at docuverse.com Wed Jan 5 17:06:18 2000
From: donpark at docuverse.com (Don Park)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
In-Reply-To: <002501bf579b$0630c4b0$20aa509c@bah.com>
Message-ID: <000101bf579f$67f9bd60$d1940e18@c1033339-a.smateo1.sfba.home.com>
>If I understand the Namespaces spec [1] correctly, an
>identical URI (defined in the spec as "exactly the same
>character-for-character") and an identical local part
>imply an identical QName. According to the spec, "the prefix
>functions only as a placeholder for a namespace name." [2]
The way I read it, QName is just prefix and local part.
Since prefix can map to anything namespace at anytime,
comparing QName doesn't tell you much. To complicate
the matter, there is also the element name to consider
for unqualified attribute names.
Hmm, Yikes.com is taken...
Don Park - mailto:donpark@docuverse.com
Docuverse - http://www.docuverse.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From smuench at us.oracle.com Wed Jan 5 17:09:52 2000
From: smuench at us.oracle.com (Steve Muench)
Date: Mon Jun 7 17:19:01 2004
Subject: To Oracle or NOT to Oracle
References: <8525685D.004DF0DF.00@csc.com>
Message-ID: <009d01bf579f$3c0fd3b0$0d7b1990@us.oracle.com>
I'm familiar with lots of web servers and servlet
engines, but not specifically the NES. If it can
be used together with a Servlet Engine, then
you're in business for getting it to talk seamlessly
with Oracle.
If you want to do your XML processing *inside*
the database running in the same memory address
space where your data lives, then Oracle8i
let's you do this in *either* Java or PL/SQL
or C or C++ with strongly W3C-standards compliant
versions of engines for working with XML, DOM,
XPath and XSLT, not to mention the bi-directional
link between richly structured Object/Relational
datatypes and XML as well as XML document searching.
Our offering to help users like yourself who may
be familiar with SQL and want to put SQL to work
with XML and XSLT to do some amazing things is
called the XSQL Servlet. This provides a framework
for declaratively tying the SQL, XML, and XSLT
worlds together in a straightforward way by
building "XSQL Pages" that are XML templates with
tags like that let you assemble
a "datapage" of active XML-based content
from the database and elsewhere and then use
XSLT to transform it into a format that's
appropriate to the requester over the web.
It comes with lots of demos and a good tutorial
to get started.
Keep an eye out for the 0.9.8.6 release of
the XSQL Servlet due to be available on our
Oracle Technet website at
http://technet.oracle.com/tech/xml in the
next few days. It contains tons of new
functionality over the 0.9.6.2 release
that's there now.
Drop in to the XML Discussion Forum
on the technet website if you have specific
Oracle and XML questions we can help you with...
_________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Business Components for Java Development Team
http://technet.oracle.com/tech/java
http://technet.oracle.com/tech/xml
----- Original Message -----
From:
To:
Sent: Wednesday, January 05, 2000 6:11 AM
Subject: To Oracle or NOT to Oracle
|
|
| Gentlemen,
| I've been following this list for about two months now and can
safely say
| that I am a "beginner" at designing XML anythings. If I'm asking too basic
a
| question please don't hesitate to tell me, or steer me to someplace else
better
| suited .
| My situation is this...the company that I work for wants a project
done
| in XML, it is not overly complicated, but it poses some problems for me.
1) They
| want this project to be a "learning" project and for me to master XML (no
| pressure!) so I can do more complex projects. 2) No one here knows anymore
XML
| than I do (which isn't alot) and nothing they have worked on has anything
at all
| to do with the way this project has to work.
| Now, at this point I don't have much in the way of software for
working
| with XML although I have downloaded "ALOT" of demos that I thought would
help.
| But alas, most of them won't do the trick. Especially since I have to
create
| this project for the government and it will be residing on a Netscape
Enterprise
| Server.
| I thought that it might be a big help to me if I could get a
"complete"
| set of XML tools with step by step instructions to walk me through some
examples
| of using XML from start to finish....maybe using a database (which would
work
| well for my first project), or something else. To date I've looked at
| "Bluestones" Visual XML, and where that is a nice looking bit of fluff
with a
| great Java interface, it seems to require too much proprietary software
(mainly
| it's bluestone server) for me to use comfortably, and a few pieces of
software
| that they don't even make to run it (i.e. Xtrans). So, I look to Oracle
8i, and
| it seems to have everything in it I need....but will it work well with
Netscape
| Enterprise Server???? I'm prepared to get this software (my company now
uses
| Oracle 7), but I need to make sure there are no exteme minuses for using
this on
| the Enterprise Server.
| If Oracle isn't the answer...any suggestions???
| I've tried getting books on XML, but most seem to base their
examples on
| using the Microsoft software that uses "data islands" which evidently I
can't
| use since I"m gonna be using the Enterprise Server......I have had Zero
luck in
| finding ANY helpful Developers books that give me the information I need.
Any
| suggestions here???? There do appear to be two books being published soon
on
| using XML with the Enterprise Server (I saw them on Amazon.com) but they
aren't
| available yet.
| Any suggestions would be helpful at this time.....and if it isn't a
| problem, in a future message, lay out what I'm trying to do (especially if
| Oracle or Bluestone isn't what I want) and get some suggestions.
| Thanks!!!! Pete Malone
|
|
|
| xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
| Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on
CD-ROM/ISBN 981-02-3594-1
| To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
| unsubscribe xml-dev
| To subscribe to the digests, mailto:majordomo@ic.ac.uk the following
message;
| subscribe xml-dev-digest
| List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|
|
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From john.aldridge at informatix.co.uk Wed Jan 5 17:22:53 2000
From: john.aldridge at informatix.co.uk (John Aldridge)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
In-Reply-To:
References:
<3.0.6.32.20000104182250.009d3590@mailhost>
<3.0.6.32.20000105112151.00bb7820@mailhost>
Message-ID: <3.0.6.32.20000105172219.00b49e20@mailhost>
At 10:12 05/01/00 -0500, David Megginson wrote:
>John Aldridge writes:
>
>In principle (the principle of least surprise), it's very bad
>behaviour for two objects to be == in C++ or equals() in Java if any
>of their publicly-accessible fields differ. Think of sets, for
>example.
OK, let me try again...
---------
class QName {
public:
wstring nsURI () const; // http://www.w3c.org/1999/xhtml
wstring localPart () const; // p
bool operator== (const QName &rhs) const;
};
class ElementInfo {
QName name () const;
wstring nsPrefix () const; // html
wstring prefixedName () const; // html:p
AttributeList &attributes () const;
};
void startElement (const ElementInfo &info) throws SAXException;
----------
Advantages:
(a) All values can be lazily evaluated if this speeds things up (i.e. the
QName and ElementInfo classes need contain no more than a raw pointer into
the parser's internal data structures).
(b) ElementInfo can be extended later to add extra methods without source
level incompatibility.
(c) QName has no public fields which do not participate in equality
testing, yet the equality operator has the "right" behaviour.
--
Cheers,
John
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 18:23:38 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost>
<3.0.6.32.20000105112151.00bb7820@mailhost>
Message-ID: <38738C21.1A8BFB0C@pacbell.net>
If SAX2 is going to be API-incompatible with SAX1, then I agree that
something like a "Name" class seems desirable. By and large, APIs that
deal with composite names do so through a unified abstraction. The few
I've seen that don't do so have been error prone.
David Megginson wrote:
>
> John Aldridge writes:
>
> > I'm sorry, I don't see the problem. The QNames are equal if ns() and
> > name() both match. ...
For the record, there's a non-normative appendix that says a few more
things. Like, the attribute name { "http://foo", "bar" } is different
the element name with the same structure (different 'partition'). Since
it's non-normative, and for other reasons, I encourage ignoring that.
(Yes, prefix isn't supposed to matter in the common case. One ignores
pointer values and use what they point to, except in special cases.)
> In principle (the principle of least surprise), it's very bad
> behaviour for two objects to be == in C++ or equals() in Java if any
> of their publicly-accessible fields differ. Think of sets, for
> example.
Actually, it's quite common for nontrivial objects that equals() only
involve a subset of the visible properties. It's probably even typical
in applications I've worked with.
There are definitions for what equals() must do, and the Java issue that
is usually overlooked is that if two objects are equals() they must
have the same hashCode()! There may be dozens of publicly accessible
properties, most of which don't affect equality.
Don't be thinking that equals() means anything more than the "most
common comparison operation". There are many comparison methods, and
also "==", that can be defined or used as needed.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Wed Jan 5 18:17:29 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost> <3.0.6.32.20000105112151.00bb7820@mailhost>
Message-ID: <38738BF3.8C505831@mecomnet.de>
If one doesn't want to leave it up to the user (eg, via user-specified class
implementations) then the parser should intern the QNames and effect object
identity according to whether it is observing namespaces or not (i.e. based on
augmenting stem equality with either prefix or uri equality).
If the interning mechanism is made available to the application, then the
application can use it to intern any "interesting" names and bind them to
static variables when it initializes. From then on, == need behave only as an
identity test.
This will get complex if the application wants to switch modi, but then I
don't believe applications belong in "non-namspace-observing" mode to begin with.
David Megginson wrote:
>
> John Aldridge writes:
>
> > I'm sorry, I don't see the problem. The QNames are equal if ns() and
> > name() both match. The prefix is irrelevant. This is what I suggested in
> > my definition of the equality operator above.
> >
> > if (qn1 == qn2) ...
> >
> > just does the right thing. If some application really wants to compare the
> > prefixed name, it can always write:
> >
> > if (qn1.prefixedName () == qn2.prefixedName ()) ...
> >
> > I'm obviously missing something, since you and other knowledgable people
> > don't regard this as self evidently obvious -- can you explain the problem
> > to me, please?
>
> In principle (the principle of least surprise), it's very bad
> behaviour for two objects to be == in C++ or equals() in Java if any
> of their publicly-accessible fields differ. Think of sets, for
> example.
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 18:32:15 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <199912262051.NAA02771@localhost.localdomain>
<14440.52595.283247.36221@localhost.localdomain>
<386FA0D2.6845B6F0@pacbell.net> <387083EF.C563875B@mecomnet.de>
Message-ID: <38738E21.55817147@pacbell.net>
james anderson wrote:
>
> i had understood
> {"","a",""},
> from the example, to denote a name in a namespace for which there would have
> been a declaration, namely a binding such as
>
> <... xmlns="" ... >
>
> for the ignominious "null" namespace. how does this come to correspond to
>
> { undeclared, "a", valid-prefix } ?
It doesn't. Namespace URIs clearly have three kinds of values, not that
it's specified in the namespace spec very clearly (and I suspect DOM L2
may need tweaking to get this right):
- Undeclared (null?)
- Declared as no-value (empty string, "")
- Some URI (the case folk focus on).
The distinction between "undefined" and "empty" will be familiar to folk
in the database world (maybe with different terms). SAX2 will have to be
clear on how it exposes this.
One more edge case for applications to trip over!
- Dave
> i agree that an "==" implementation needs to account for this, but didn't
> think it was nonconformant.
>
> David Brownell wrote:
> >
> > David Megginson wrote:
> > >
> > > Clark C. Evans writes:
> > >
> > > > On Sun, 26 Dec 1999 uche.ogbuji@fourthought.com wrote:
> > > > >
> > > > > {"http://www.w3.org/1999/xhtml", "a", ""} ==
> > > > > {"http://www.w3.org/1999/xhtml", "a", "html"}.
> > > >
> > > > {"","a",""} != {"","a","html"}
> > >
> > > As I understood it, the suggestion was that
> > >
> > > {"", "a", ""} == {"", "a", "html"}
> >
> > Actually I think the namespace spec defines
> >
> > { undeclared, "a", valid-prefix }
> >
> > as "namespace-nonconformant", AKA some kind of error which they
> > neglected to describe well enough to support portable APIs.
> >
> > Meaning that any application choosing to use such a "Name"
> > class (which IMHO is a fine notion) needs to treat this value
> > with care ... IEEE floating point math has a variety of sorts
> > of "NaN" values, perhaps useful models can be found there.
> > I'd suggest that most "==" tests against such a Name ought to
> > fail, and ordering tests should cause exceptions.
> >
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 18:41:24 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:01 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost>
<3.0.6.32.20000105112151.00bb7820@mailhost> <38738C21.1A8BFB0C@pacbell.net>
Message-ID: <3873902A.81A3ACF2@algx.net>
David Brownell wrote:
>
> If SAX2 is going to be API-incompatible with SAX1, then I agree that
> something like a "Name" class seems desirable. By and large, APIs that
> deal with composite names do so through a unified abstraction. The few
> I've seen that don't do so have been error prone.
I agree a helper class could greatly simplify using namespaces/URI/etc.
correctly.
>
> David Megginson wrote:
> >
> > John Aldridge writes:
> >
> > > I'm sorry, I don't see the problem. The QNames are equal if ns() and
> > > name() both match. ...
>
> For the record, there's a non-normative appendix that says a few more
> things. Like, the attribute name { "http://foo", "bar" } is different
> the element name with the same structure (different 'partition'). Since
> it's non-normative, and for other reasons, I encourage ignoring that.
>
> (Yes, prefix isn't supposed to matter in the common case. One ignores
> pointer values and use what they point to, except in special cases.)
>
> > In principle (the principle of least surprise), it's very bad
> > behaviour for two objects to be == in C++ or equals() in Java if any
> > of their publicly-accessible fields differ. Think of sets, for
> > example.
>
> Actually, it's quite common for nontrivial objects that equals() only
> involve a subset of the visible properties. It's probably even typical
> in applications I've worked with.
I agree with David B. in theory, but David M. (gee, that's confusing...)
in practice. I think that equality, and assumptions about equality,
have some side effects. For example, if two objects compared through
equals() return true, then I expect to be able to use the object
interchangeable. Notice I didn't add [for the specific task they were
being compared for] to the end of that sentence. In other words, though
they may be equal for the purpose of the startElement() function, they
may not be equal in a case where the differing public fields are
actually used.
This to me reeks of bugs waiting to happen if the two objects were
evaluated as equal, because of this. Someone will surely manage to
happily go use Q2 because it is equals() to Q1 someplace where Q2 will
not achive the same results as Q1. I'd bet lunch on it ;-)
So I think equals() isn't a good idea; however, something like if
(name1.sameNamespace(name2))
or something equivalent (not the
best example, but you get the idea) doesn't offend my eyes.... for what
it's worth.
-Brett
>
> There are definitions for what equals() must do, and the Java issue that
> is usually overlooked is that if two objects are equals() they must
> have the same hashCode()! There may be dozens of publicly accessible
> properties, most of which don't affect equality.
>
> Don't be thinking that equals() means anything more than the "most
> common comparison operation". There are many comparison methods, and
> also "==", that can be defined or used as needed.
>
> - Dave
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From john.aldridge at informatix.co.uk Wed Jan 5 18:50:26 2000
From: john.aldridge at informatix.co.uk (John Aldridge)
Date: Mon Jun 7 17:19:01 2004
Subject: Round 2: How an XML instance document references an XML
Schema
In-Reply-To: <38720239.481577DF@mitre.org>
Message-ID: <3.0.6.32.20000105184943.00aae430@mailhost>
At 09:22 04/01/00 -0500, "Roger L. Costello" wrote:
>There has been a considerable amount of discussion (and confusion) on
>how an XML instance document indicates the XML Schema(s) that it
>conforms to. I am not sure that it is yet clear in people's minds on
>how to do it. I will take a stab at explaining it, based upon the
>discussions.
(snip very helpful exposition)
I'm still struggling, however to understand how this is all intended to
work in an environment which is not continuously connected to the internet.
Even on machines which are themseleves well connected, it's surely
unacceptable to have one's data become unusable because the machine in
Outer Mongolia which holds the schema has crashed.
Note that this is not just a matter of validation, because the schema can
supply default attribute values. The data can become meaningless in the
absence of a schema.
I'd hoped to find a statement such as "a general-purpose schema-aware
processor must provide some catalogue facility which allows the
specification of a location from which to fetch the schema corresponding to
an NS URI. Only in the absence of such a catalogue entry may the processor
attempt to dereference the URI given by the schemaLocation attribute".
I'm also puzzled about the semantics of a namespace declaration without a
corresponding schemaLocation attribute. Does it mean:
(a) Names in the namespace do not have an association to a schema. No
validation is to be performed (and no attribute defaults are to be supplied).
(b) Unless the processor provides some alternative method of locating the
applicable schema, then the data cannot be interpreted and an error occurs.
--
Cheers,
John
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tbray at textuality.com Wed Jan 5 18:56:24 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
Message-ID: <3.0.32.20000105105740.01441180@pop.intergate.ca>
At 10:32 AM 1/5/00 -0800, David Brownell wrote:
>Namespace URIs clearly have three kinds of values, not that
>it's specified in the namespace spec very clearly (and I suspect DOM L2
>may need tweaking to get this right):
>
> - Undeclared (null?)
> - Declared as no-value (empty string, "")
> - Some URI (the case folk focus on).
No. The second case is explicitly ruled out by the namespace spec. Check
sections 2 and 5.2 of the namespace spec. The DOM WG checked this carefully
and did the right thing. There are only two cases: there is a namespace
with a non-null URI, or there isn't a namespace.
>One more edge case for applications to trip over!
Wrong. -Tim
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 19:20:03 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost>
<3.0.6.32.20000105112151.00bb7820@mailhost>
<38738C21.1A8BFB0C@pacbell.net> <3873902A.81A3ACF2@algx.net> <3873980F.74FE29E4@pacbell.net>
Message-ID: <3873993F.CB9D66B6@algx.net>
David Brownell wrote:
>
> Brett McLaughlin wrote:
> >
> > David Brownell wrote:
> > >
> > > David Megginson wrote:
> > > >
> > > > In principle (the principle of least surprise), it's very bad
> > > > behaviour for two objects to be == in C++ or equals() in Java if any
> > > > of their publicly-accessible fields differ. Think of sets, for
> > > > example.
> > >
> > > Actually, it's quite common for nontrivial objects that equals() only
> > > involve a subset of the visible properties. It's probably even typical
> > > in applications I've worked with.
> >
> > I agree with David B. in theory, but David M. (gee, that's confusing...)
> > in practice. I think that equality, and assumptions about equality,
> > have some side effects. For example, if two objects compared through
> > equals() return true, then I expect to be able to use the object
> > interchangeable.
>
> You expect wrong; sorry. Look at the spec for java.lang.Object.equals();
> it guarantees quite a few properties (reflexive, symmetric, transitive,
> consistent, ...) but NOT substitutability. (Use "==" or some specialized
> method for that.)
No... read again:
> > I agree with David B. in <>, but David M. (gee, that's confusing...)
> > in <>.
I know what equals() is supposed to do. However, if we took a poll on
who knows what it is supposed to do, you wouldn't get many "ayes" :-(
I know this is defensive programming. However, if you _know_ a lot of
people are going to make a mistake, shouldn't, as a good developer, you
try to avoid cases where you _invite_ that mistake? I don't argue with
your reading of Sun's API. In fact, I agree (which is why I always
implement equals() and hashCode() in my custom classes). However, I
know how people think (try writing a book to the masses, and making
assumptions about what people know - not pretty!), and am forced to
acknowledge that.
>
> > So I think equals() isn't a good idea; however, something like if
> > (name1.sameNamespace(name2))
or something equivalent (not the
> > best example, but you get the idea) doesn't offend my eyes.... for what
> > it's worth.
>
> Were there to be a Name class that couldn't be used as a hashtable key to
> get the expected effect, then it'd be unusable. You're suggesting that,
> in effect.
Only to a certain degree; the example was just to say if we want to
provide an equality test for this specific purpose, than I think a
better choice (one that helps people, but doesn't hurt us) would be to
use a more intuitive name than equals(). But yes, using equals() or any
related function carries with it some side effects such as hashtable key
considerations.
-Brett
>
> - Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Wed Jan 5 19:21:18 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
Message-ID: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com>
Hi,
I'm trying to wrap my head around the XMLSchema drafts to determine their
immediate usefulness (to myself), and have some very basic questions.
1) What is the difference between an archetype, type and datatype?
When is one used in place of the other.
2) Is multiple inheritance not supported for derived types?
2a) How is inheritance supported? Is it possible to access the elements of a
types source without manually doing the traversal, or is inheritance only
useful in the instance document?
3) Is it possible to use the schema for application specific requirements.
For example, I'm basing my schema on a Java class model and would like to
specify the Java class name in the schema. The only way I can see is to
wrap it in an .
3a) Likewise, certain may actually refer to another type, so I
want to do something like:
I know I can say something like:
but that isn't really flexible enough.
Perhaps type can hold a ref of some sort, tho....
Maybe I would just be better off with another XML instance document
describing the class model?
thanks,
alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Wed Jan 5 19:19:24 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <199912262051.NAA02771@localhost.localdomain>
<14440.52595.283247.36221@localhost.localdomain>
<386FA0D2.6845B6F0@pacbell.net> <387083EF.C563875B@mecomnet.de> <38738E21.55817147@pacbell.net>
Message-ID: <38739A7A.731133E7@mecomnet.de>
hmm..., the thread is becoming rather tenuous, but, if you concur, that
{"","a",""}, which is descibes <... xmlns="" ... > is not the same as {
undeclared, "a", valid-prefix }, then how does the notion of nonconformance
enter into the question re
> > > {"", "a", ""} == {"", "a", "html"}
?
David Brownell wrote:
>
> james anderson wrote:
> >
> > i had understood
> > {"","a",""},
> > from the example, to denote a name in a namespace for which there would have
> > been a declaration, namely a binding such as
> >
> > <... xmlns="" ... >
> >
> > for the ignominious "null" namespace. how does this come to correspond to
> >
> > { undeclared, "a", valid-prefix } ?
>
> It doesn't. Namespace URIs clearly have three kinds of values, not that
> it's specified in the namespace spec very clearly (and I suspect DOM L2
> may need tweaking to get this right):
>
> - Undeclared (null?)
> - Declared as no-value (empty string, "")
> - Some URI (the case folk focus on).
don't they have four?
- Undeclared (not "null"; that term already has a different meaning
in the REC)
- Declared as "no namespace": xmlns=""
- Declares as the empty string: xmlns:html=""
- Some URI (the case folk focus on).
>
> The distinction between "undefined" and "empty" will be familiar to folk
> in the database world (maybe with different terms). SAX2 will have to be
> clear on how it exposes this.
>
> One more edge case for applications to trip over!
>
> - Dave
>
> > i agree that an "==" implementation needs to account for this, but didn't
> > think it was nonconformant.
> >
> > David Brownell wrote:
> > >
> > > David Megginson wrote:
> > > >
> > > > Clark C. Evans writes:
> > > >
> > > > > On Sun, 26 Dec 1999 uche.ogbuji@fourthought.com wrote:
> > > > > >
> > > > > > {"http://www.w3.org/1999/xhtml", "a", ""} ==
> > > > > > {"http://www.w3.org/1999/xhtml", "a", "html"}.
> > > > >
> > > > > {"","a",""} != {"","a","html"}
> > > >
> > > > As I understood it, the suggestion was that
> > > >
> > > > {"", "a", ""} == {"", "a", "html"}
> > >
> > > Actually I think the namespace spec defines
> > >
> > > { undeclared, "a", valid-prefix }
> > >
> > > as "namespace-nonconformant", AKA some kind of error which they
> > > neglected to describe well enough to support portable APIs.
> > >
> > > Meaning that any application choosing to use such a "Name"
> > > class (which IMHO is a fine notion) needs to treat this value
> > > with care ... IEEE floating point math has a variety of sorts
> > > of "NaN" values, perhaps useful models can be found there.
> > > I'd suggest that most "==" tests against such a Name ought to
> > > fail, and ordering tests should cause exceptions.
> > >
> >
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 19:14:36 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost>
<3.0.6.32.20000105112151.00bb7820@mailhost>
<38738C21.1A8BFB0C@pacbell.net> <3873902A.81A3ACF2@algx.net>
Message-ID: <3873980F.74FE29E4@pacbell.net>
Brett McLaughlin wrote:
>
> David Brownell wrote:
> >
> > David Megginson wrote:
> > >
> > > In principle (the principle of least surprise), it's very bad
> > > behaviour for two objects to be == in C++ or equals() in Java if any
> > > of their publicly-accessible fields differ. Think of sets, for
> > > example.
> >
> > Actually, it's quite common for nontrivial objects that equals() only
> > involve a subset of the visible properties. It's probably even typical
> > in applications I've worked with.
>
> I agree with David B. in theory, but David M. (gee, that's confusing...)
> in practice. I think that equality, and assumptions about equality,
> have some side effects. For example, if two objects compared through
> equals() return true, then I expect to be able to use the object
> interchangeable.
You expect wrong; sorry. Look at the spec for java.lang.Object.equals();
it guarantees quite a few properties (reflexive, symmetric, transitive,
consistent, ...) but NOT substitutability. (Use "==" or some specialized
method for that.)
> So I think equals() isn't a good idea; however, something like if
> (name1.sameNamespace(name2))
or something equivalent (not the
> best example, but you get the idea) doesn't offend my eyes.... for what
> it's worth.
Were there to be a Name class that couldn't be used as a hashtable key to
get the expected effect, then it'd be unusable. You're suggesting that,
in effect.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 19:38:52 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com>
Message-ID: <38739DA6.D844DBC7@algx.net>
Alan Santos wrote:
>
> Hi,
> I'm trying to wrap my head around the XMLSchema drafts to determine their
> immediate usefulness (to myself), and have some very basic questions.
>
> 1) What is the difference between an archetype, type and datatype?
> When is one used in place of the other.
is gone, replaced by , which is used for specifying
non-"primitive" (i.e. predefined) types for elements.
is for doing the same sort of operation on attributes.
for example:
>
> 2) Is multiple inheritance not supported for derived types?
Personal Opinion: Stay away from using inheritance - it is changing like
mad, and is not a great solution for XML inheritance, anyway (IMHO). We
are working on a proposal for this over at Apache XML, but it is not
ready for primetime yet.
>
> 2a) How is inheritance supported? Is it possible to access the elements of a
> types source without manually doing the traversal, or is inheritance only
> useful in the instance document?
See #2
>
> 3) Is it possible to use the schema for application specific requirements.
> For example, I'm basing my schema on a Java class model and would like to
> specify the Java class name in the schema. The only way I can see is to
> wrap it in an .
Your schema is one-to-one with a Java class? This wouldn't be a good
idea, unless I'm misunderstanding your intent. Maybe your _XML_ is
based on a class, and it specifies the class, but then multiple XML docs
(therefore multiple classes) all use the same Schema.
>
> 3a) Likewise, certain may actually refer to another type, so I
> want to do something like:
>
>
> I know I can say something like:
>
>
>
> but that isn't really flexible enough.
Why not? What's the difference in your mind? If you can define an
infinite number of types, and define an infinite number of elements with
any defined type, how is that not flexible?
>
> Perhaps type can hold a ref of some sort, tho....
>
> Maybe I would just be better off with another XML instance document
> describing the class model?
Sounds like it. Schemas are not ready to replace XML documents. Don't
try it...
-Brett
>
> thanks,
> alan
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 19:41:17 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <3.0.32.20000105105740.01441180@pop.intergate.ca>
Message-ID: <38739E51.973765FA@pacbell.net>
Tim Bray wrote:
>
> At 10:32 AM 1/5/00 -0800, David Brownell wrote:
> >Namespace URIs clearly have three kinds of values, not that
> >it's specified in the namespace spec very clearly (and I suspect DOM L2
> >may need tweaking to get this right):
> >
> > - Undeclared (null?)
> > - Declared as no-value (empty string, "")
> > - Some URI (the case folk focus on).
>
> No. The second case is explicitly ruled out by the namespace spec. Check
> sections 2 and 5.2 of the namespace spec.
I think you've gotten confused by the multiple iterations on this
topic. Likely not the only person!
My original statement was about an error case, an undeclared prefix.
The followup was about a non-error case, the default namespace, and
specifically what 'xmlns=""' does. That response addressed both issues.
To be clearer, the cases correspond to these XML documents:
- undeclared prefix (error for namespace, but legal XML)
- default namespace (per namespace spec, sections 2, 5.2)
and similarly
- Some URI
That is, there's a distinction between "declaration needed and missing"
and "default namespace".
Since the XML standard doesn't directly incorporate the namespaces
spec (and make the first case be a fatal error), there needs to be
some way to deal with that first case, and some way that it'll be
exposed through APIs. Perhaps you have a suggestion about another
way to expose it?
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 19:45:22 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <199912262051.NAA02771@localhost.localdomain>
<14440.52595.283247.36221@localhost.localdomain>
<386FA0D2.6845B6F0@pacbell.net> <387083EF.C563875B@mecomnet.de>
<38738E21.55817147@pacbell.net> <38739A7A.731133E7@mecomnet.de>
Message-ID: <38739F49.A759C266@pacbell.net>
james anderson wrote:
>
> hmm..., the thread is becoming rather tenuous, but, if you concur, that
> {"","a",""}, which is descibes <... xmlns="" ... > is not the same as {
> undeclared, "a", valid-prefix }, then how does the notion of nonconformance
> enter into the question re
>
> > > > {"", "a", ""} == {"", "a", "html"}
>
> ?
Tim pointed out the spec only allows a null URI in the case of the
default namespace declaration: xmlns="". Prefix declarations may
not have a null URI: xmlns:html="" is someone's bad. Likewise is
a reference to an undeclared "html" prefix.
At the moment I won't suggest how to expose the former error, but
I'd thought it was pretty clear how to expose the latter.
- Dave
> David Brownell wrote:
> >
> > james anderson wrote:
> > >
> > > i had understood
> > > {"","a",""},
> > > from the example, to denote a name in a namespace for which there would have
> > > been a declaration, namely a binding such as
> > >
> > > <... xmlns="" ... >
> > >
> > > for the ignominious "null" namespace. how does this come to correspond to
> > >
> > > { undeclared, "a", valid-prefix } ?
> >
> > It doesn't. Namespace URIs clearly have three kinds of values, not that
> > it's specified in the namespace spec very clearly (and I suspect DOM L2
> > may need tweaking to get this right):
> >
> > - Undeclared (null?)
> > - Declared as no-value (empty string, "")
> > - Some URI (the case folk focus on).
>
> don't they have four?
> - Undeclared (not "null"; that term already has a different meaning
> in the REC)
> - Declared as "no namespace": xmlns=""
> - Declares as the empty string: xmlns:html=""
> - Some URI (the case folk focus on).
>
> >
> > The distinction between "undefined" and "empty" will be familiar to folk
> > in the database world (maybe with different terms). SAX2 will have to be
> > clear on how it exposes this.
> >
> > One more edge case for applications to trip over!
> >
> > - Dave
> >
> > > i agree that an "==" implementation needs to account for this, but didn't
> > > think it was nonconformant.
> > >
> > > David Brownell wrote:
> > > >
> > > > David Megginson wrote:
> > > > >
> > > > > Clark C. Evans writes:
> > > > >
> > > > > > On Sun, 26 Dec 1999 uche.ogbuji@fourthought.com wrote:
> > > > > > >
> > > > > > > {"http://www.w3.org/1999/xhtml", "a", ""} ==
> > > > > > > {"http://www.w3.org/1999/xhtml", "a", "html"}.
> > > > > >
> > > > > > {"","a",""} != {"","a","html"}
> > > > >
> > > > > As I understood it, the suggestion was that
> > > > >
> > > > > {"", "a", ""} == {"", "a", "html"}
> > > >
> > > > Actually I think the namespace spec defines
> > > >
> > > > { undeclared, "a", valid-prefix }
> > > >
> > > > as "namespace-nonconformant", AKA some kind of error which they
> > > > neglected to describe well enough to support portable APIs.
> > > >
> > > > Meaning that any application choosing to use such a "Name"
> > > > class (which IMHO is a fine notion) needs to treat this value
> > > > with care ... IEEE floating point math has a variety of sorts
> > > > of "NaN" values, perhaps useful models can be found there.
> > > > I'd suggest that most "==" tests against such a Name ought to
> > > > fail, and ordering tests should cause exceptions.
> > > >
> > >
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tbray at textuality.com Wed Jan 5 19:51:25 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
Message-ID: <3.0.32.20000105115237.014e58d0@pop.intergate.ca>
At 11:41 AM 1/5/00 -0800, David Brownell wrote:
>To be clearer, the cases correspond to these XML documents:
> - undeclared prefix (error for namespace, but legal XML)
>
In SAX2, if namespace processing is turned on (the default) this clearly
has to be handled as an error.
> - default namespace (per namespace spec, sections 2, 5.2)
>
>
>
Likewise. xmlns:prefix="" is always an error per the namespace spec.
Er, did you mean ? If so, it's correct and EXAMPLE is
not in any namespace.
> - Some URI
>
What's the problem here?
>That is, there's a distinction between "declaration needed and missing"
>and "default namespace".
Indeed. The first is an error, the second is legal. I'm feeling stupid,
because I think I'm missing your point.
>Since the XML standard doesn't directly incorporate the namespaces
>spec (and make the first case be a fatal error), there needs to be
>some way to deal with that first case, and some way that it'll be
>exposed through APIs.
The only way to expose the first case is as an error. What am I missing?
-Tim
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 19:54:05 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <3.0.32.20000105105740.01441180@pop.intergate.ca> <38739E51.973765FA@pacbell.net>
Message-ID: <3873A155.CF65DABC@pacbell.net>
And as for the obvious typo, strike the highlighted characters
David Brownell wrote:
>
> To be clearer, the cases correspond to these XML documents:
>
> - undeclared prefix (error for namespace, but legal XML)
>
>
> - default namespace (per namespace spec, sections 2, 5.2)
>
>
XXXXXXX
>
> and similarly
>
>
> - Some URI
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From fscheng at netzero.net Wed Jan 5 19:56:28 2000
From: fscheng at netzero.net (Franklin Cheng)
Date: Mon Jun 7 17:19:02 2004
Subject: unsubscribe
Message-ID: <002301bf57b6$bbdb0260$644b8fcd@intervoice.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ic.ac.uk/pipermail/xml-dev/attachments/20000105/696da471/attachment.htm
From tbray at textuality.com Wed Jan 5 19:59:36 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
Message-ID: <3.0.32.20000105120042.014e58a0@pop.intergate.ca>
At 11:45 AM 1/5/00 -0800, David Brownell wrote:
>Tim pointed out the spec only allows a null URI in the case of the
>default namespace declaration: xmlns="".
And when you're doing this, you're saying that there is *no* default
namespace, not that the default namespace is "".
Pardon for flogging this possibly-dead horse, but you have to read the
text of the namespace spec carefully to realise that you just can't ever
have a namespace URI whose value is "". We should have put in a sentence
in section 5.2 saying "Note that as a consequence of this rule, it is not
possible to have a namespace whose value is the empty string."
As a consequence of this, I have suggested that in SAX2, we use ""
to represent the absence of a namespace rather than null. Then you'll
always be able to do
if (ns.equals(myNamespace))
rather than
if ((ns != null) && ns.equals(myNamespace))
-Tim
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Wed Jan 5 20:02:03 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
References: <3.0.32.20000105115237.014e58d0@pop.intergate.ca>
Message-ID: <3873A332.1C8463F8@pacbell.net>
Tim Bray wrote:
>
> At 11:41 AM 1/5/00 -0800, David Brownell wrote:
> >To be clearer, the cases correspond to these XML documents:
> > - undeclared prefix (error for namespace, but legal XML)
> >
>
> In SAX2, if namespace processing is turned on (the default) this clearly
> has to be handled as an error.
And the proposal was that it'd be nonfatal, so that applications
will be seeing such data when they continue after nonfatal errors.
One issue was how it'd be represented ... given an API that provides
a namespace URI with every name, what it would provide there.
> > - default namespace (per namespace spec, sections 2, 5.2)
> >
> >
> >
>
> Likewise. xmlns:prefix="" is always an error per the namespace spec.
> Er, did you mean ? If so, it's correct and EXAMPLE is
> not in any namespace.
The ":prefix" was a typo, yes. I used the phrase "default
namespace" incorrectly. This was to be "good" input.
> > - Some URI
> >
>
> What's the problem here?
There was none. The second and third cases were intended to be legal
both from the XML and the namespaces perspective; only the first was
to be problematic.
> >That is, there's a distinction between "declaration needed and missing"
> >and "default namespace".
>
> Indeed. The first is an error, the second is legal. I'm feeling stupid,
> because I think I'm missing your point.
How to expose the first case through the API, given that like any
validity constraint it's not fatal.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From msabin at cromwellmedia.co.uk Wed Jan 5 20:10:00 2000
From: msabin at cromwellmedia.co.uk (Miles Sabin)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
Message-ID:
Tim Bray wrote,
> As a consequence of this, I have suggested that in SAX2, we
> use "" to represent the absence of a namespace rather than
> null. Then you'll always be able to do
>
> if (ns.equals(myNamespace))
>
> rather than
>
> if ((ns != null) && ns.equals(myNamespace))
I don't think that's enough of a justification, because so
long as myNamespace is known to be non-null (surely the most
common case) we could represent the absence of a namespace as
null and write,
if(myNamespace.equals(ns))
I think the Java idiom,
if(knownNonNull.equals(possiblyNull))
is widely known enough to make this reasonable.
Cheers,
Miles
--
Miles Sabin Cromwell Media
Internet Systems Architect 5/6 Glenthorne Mews
+44 (0)20 8817 4030 London, W6 0LJ, England
msabin@cromwellmedia.com http://www.cromwellmedia.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Wed Jan 5 20:15:28 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net>
Message-ID: <004e01bf57ba$54cce170$5914c897@odi.com>
Thanks for the quick response Brett.
In the example below, I understand the point of ,
but what is getting us? Don't you have the same thing without it?
> for example:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Your schema is one-to-one with a Java class? This wouldn't be a good
> idea, unless I'm misunderstanding your intent. Maybe your _XML_ is
> based on a class, and it specifies the class, but then multiple XML docs
> (therefore multiple classes) all use the same Schema.
>
The _XML_ contains instances. But felt it was more appropriate within the
schema document. (Or some other xml instance document)
Why do you feel it is a poor decision?
Am I abusing the intent of an XML Schema in a horrible manner?
Perhaps XMI is a better option for my needs?
> Why not? What's the difference in your mind? If you can define an
> infinite number of types, and define an infinite number of elements with
> any defined type, how is that not flexible?
Sorry, it is flexible, it just means more work for me, and users of my
application.
Now we need two elements when we wish to add a new type to the schema
(unless I'm missing something else)
(e.g.
)
thanks,
alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From lauren at sqwest.bc.ca Wed Jan 5 20:22:36 2000
From: lauren at sqwest.bc.ca (Lauren Wood)
Date: Mon Jun 7 17:19:02 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
In-Reply-To: <3.0.32.20000105120042.014e58a0@pop.intergate.ca>
Message-ID: <200001052017.MAA22646@mail.sqwest.bc.ca>
On 5 Jan 00, at 12:00, Tim Bray wrote:
> Pardon for flogging this possibly-dead horse, but you have to read the
> text of the namespace spec carefully to realise that you just can't ever
> have a namespace URI whose value is "". We should have put in a sentence
> in section 5.2 saying "Note that as a consequence of this rule, it is not
> possible to have a namespace whose value is the empty string."
>
> As a consequence of this, I have suggested that in SAX2, we use ""
> to represent the absence of a namespace rather than null.
This also matches the DOM Level 2 usage, where the absence of a
namespace can be represented by null or "", depending on the
method or property.
Lauren
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 21:14:18 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com>
Message-ID: <3873B401.BB59B080@algx.net>
Alan Santos wrote:
>
> Thanks for the quick response Brett.
>
> In the example below, I understand the point of ,
> but what is getting us? Don't you have the same thing without it?
Nope. This:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
is mucho illegal. Remember that XML Schema will be handled by SAX,
which is sequential. So SAX must know _ahead_ of time that it is going
to be dealing with a compound type. That way it can know to allow
multiple element definitions within another definition.
Without the construct, SAX would have to "magically" know when
nested element definitions are legal and when they are not... I know
there are other good reasons, too, although I'm too tired to think of
them... sorry.. ;-)
-Brett
>
> > for example:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> > Your schema is one-to-one with a Java class? This wouldn't be a good
> > idea, unless I'm misunderstanding your intent. Maybe your _XML_ is
> > based on a class, and it specifies the class, but then multiple XML docs
> > (therefore multiple classes) all use the same Schema.
> >
>
> The _XML_ contains instances. But felt it was more appropriate within the
> schema document. (Or some other xml instance document)
>
> Why do you feel it is a poor decision?
> Am I abusing the intent of an XML Schema in a horrible manner?
> Perhaps XMI is a better option for my needs?
>
> > Why not? What's the difference in your mind? If you can define an
> > infinite number of types, and define an infinite number of elements with
> > any defined type, how is that not flexible?
>
> Sorry, it is flexible, it just means more work for me, and users of my
> application.
>
> Now we need two elements when we wish to add a new type to the schema
> (unless I'm missing something else)
>
> (e.g.
> )
>
> thanks,
> alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From clark.evans at manhattanproject.com Wed Jan 5 21:22:38 2000
From: clark.evans at manhattanproject.com (Clark C. Evans)
Date: Mon Jun 7 17:19:02 2004
Subject: John's Suggestion (Was: Re: SAX2 Namespace Support)
In-Reply-To: <3.0.6.32.20000105172219.00b49e20@mailhost>
Message-ID:
Pretty. John's Suggestion is a step in the right direction.
On Wed, 5 Jan 2000, John Aldridge wrote:
>
> class QName {
> public:
> wstring nsURI () const; // http://www.w3c.org/1999/xhtml
> wstring localPart () const; // p
> bool operator== (const QName &rhs) const;
> };
>
> class ElementInfo {
> QName name () const;
> wstring nsPrefix () const; // html
> wstring prefixedName () const; // html:p
> AttributeList &attributes () const;
> };
>
> void startElement (const ElementInfo &info) throws SAXException;
However, it still fails the following "non-namespace" edge case...
{ not-specified, "html", "p" } == { not-specified, "html", "p" }
and { not-specified, "" , "p" } != { not-specified, "html", "p" }
Let's repair...
class QName {
public:
boolean isURI() const;
wstring qualifier() const;
wstring local() const;
bool operator== (const QName &rhs) const;
};
Where, in the not-specified cases, isURI() returns "false",
and qualifier() returns the prefix. And, in the specified
cases, isURI() returns "true" and qualifier() returns the URI.
Clark
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 21:30:55 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net>
Message-ID: <3873B7E7.C320C504@algx.net>
Brett McLaughlin wrote:
>
> Alan Santos wrote:
> >
> > Thanks for the quick response Brett.
> >
> > In the example below, I understand the point of ,
> > but what is getting us? Don't you have the same thing without it?
>
> Nope. This:
>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
>
> is mucho illegal. Remember that XML Schema will be handled by SAX,
> which is sequential. So SAX must know _ahead_ of time that it is going
> to be dealing with a compound type. That way it can know to allow
> multiple element definitions within another definition.
>
> Without the construct, SAX would have to "magically" know when
> nested element definitions are legal and when they are not... I know
> there are other good reasons, too, although I'm too tired to think of
> them... sorry.. ;-)
Dah! I'm asleep today... the reason you need is because you can
specify explicit named types:
There is no way without the element construct to specify a name
for a non-primitive data type without really blowing away any idea of
congruity across the element space. So we have the "type" element.
Make sense?
-Brett
>
> -Brett
>
> >
> > > for example:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > > Your schema is one-to-one with a Java class? This wouldn't be a good
> > > idea, unless I'm misunderstanding your intent. Maybe your _XML_ is
> > > based on a class, and it specifies the class, but then multiple XML docs
> > > (therefore multiple classes) all use the same Schema.
> > >
> >
> > The _XML_ contains instances. But felt it was more appropriate within the
> > schema document. (Or some other xml instance document)
> >
> > Why do you feel it is a poor decision?
> > Am I abusing the intent of an XML Schema in a horrible manner?
> > Perhaps XMI is a better option for my needs?
> >
> > > Why not? What's the difference in your mind? If you can define an
> > > infinite number of types, and define an infinite number of elements with
> > > any defined type, how is that not flexible?
> >
> > Sorry, it is flexible, it just means more work for me, and users of my
> > application.
> >
> > Now we need two elements when we wish to add a new type to the schema
> > (unless I'm missing something else)
> >
> > (e.g.
> > )
> >
> > thanks,
> > alan
>
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
> To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
> unsubscribe xml-dev
> To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Wed Jan 5 21:52:14 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net>
Message-ID: <004201bf57c7$d69aa270$5914c897@odi.com>
> Dah! I'm asleep today... the reason you need is because you can
> specify explicit named types:
>
>
>
>
>
>
>
>
> There is no way without the element construct to specify a name
> for a non-primitive data type without really blowing away any idea of
> congruity across the element space. So we have the "type" element.
>
> Make sense?
>
Yes it does now.
Syntactically it appears to be legal to simply have on it's own,
outside of any elements. Is it simply a stylistic difference to define it
inside another element?
thanks,
alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Wed Jan 5 21:59:37 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com>
Message-ID: <3873BEA6.F227D928@algx.net>
Alan Santos wrote:
>
> > Dah! I'm asleep today... the reason you need is because you can
> > specify explicit named types:
> >
> >
> >
> >
> >
> >
> >
> >
> > There is no way without the element construct to specify a name
> > for a non-primitive data type without really blowing away any idea of
> > congruity across the element space. So we have the "type" element.
> >
> > Make sense?
> >
>
> Yes it does now.
>
> Syntactically it appears to be legal to simply have on it's own,
> outside of any elements. Is it simply a stylistic difference to define it
> inside another element?
Nope. This:
is an implicit element type. It is used right there and not
referenceable by any other element.
This:
is an explicit element type and is referenceable by other elements:
This:
is absolutely useless, as it is not referenceable by any other element,
and is not implicitly assigned to any other element.
Finally, the last permutation:
is legal, and the type is referenceable by other elements, but is bad
form (IMHO). If you have a type that will be used multiple times, put
it on its own (explicit type). If it is only used once, use an implicit
type within the element definition. Things like this are very
confusing.
-Brett
>
> thanks,
> alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From clark.evans at manhattanproject.com Wed Jan 5 23:12:13 2000
From: clark.evans at manhattanproject.com (Clark C. Evans)
Date: Mon Jun 7 17:19:02 2004
Subject: "plain" element for HTML/XHTML
In-Reply-To: <3873BEA6.F227D928@algx.net>
Message-ID:
Dear XHTML Working Group,
I would like to propose a new element, "plain", which
has no attributes, and forbids any content other than
zero or more characters. The "plain" element would be
another alternation in the BNF text production.
Thus, the following mixed-content HTML:
Mixed
content
Would be "display equivalent" to:
Mixed
content
Benefits:
1. This would allow the data structures for an HTML
processor/editor to avoid "text node type" and
its related mixed-content issues.
2. The tag is both forward and backwards
compatible.
Rationale:
I've been involved with numerous discussions over the
last month on the sml-dev list over the complications
that are created using mixed-content. Specifically,
how text nodes are difficult to manage programmatically
through DOM. I've also experienced a good deal of pain
with regard to this problem myself.
On the sml-dev list, we've come up with an information
model that avoids mixed-content issues by allowing a
node to either have one or more characters, or zero or
more child nodes, but not both. We would like to
be able use HTML from our SML model.
Also, since I am currently able to use the
tag on the bulk of browsers today, this is a workable
solution that has been implemented and tested.
It would be great to have the tag name reserved as
part of the HTML standard.
Thank you for your time and consideration,
Clark C. Evans
P.S. If you are interested in issues like this
please visit the sml-dev mailing list at egroups.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Wed Jan 5 23:10:35 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:02 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com> <3873BEA6.F227D928@algx.net>
Message-ID: <002801bf57d2$cb2017d0$5914c897@odi.com>
> >
> > Syntactically it appears to be legal to simply have on it's own,
Sorry, I meant to say , I'm pretty clear on type now.
Thanks very much.
You may have missed another question in a previous email....
At one point you had made a critical remark regarding XML schema to model a
class...
"Your schema is one-to-one with a Java class? This wouldn't be a good
idea, unless I'm misunderstanding your intent. Maybe your _XML_ is
based on a class, and it specifies the class, but then multiple XML docs
(therefore multiple classes) all use the same Schema."
Originally, this is what I was trying to use an XML Schema to do (that is:
store class info), and use an XML document to store instance values. (Sort
of a simplified XMI)
I'm not sure I can do this, in any manner that doesn't break XML schemas.
There doesn't appear to be a mechanism in place to expand the functionality
of XML-Schemas
But if it is possible, I'm interested in why you feel this is a bad idea?
(BTW, I think this is similar to what was done with Quick)
Finally, .
thanks,
alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 23:19:00 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:02 2004
Subject: Round 2: How an XML instance document references an XML Schema
In-Reply-To: John Aldridge's message of "Wed, 05 Jan 2000 18:49:43 +0000"
References: <3.0.6.32.20000105184943.00aae430@mailhost>
Message-ID:
John Aldridge writes:
> At 09:22 04/01/00 -0500, "Roger L. Costello" wrote:
>
> >There has been a considerable amount of discussion (and confusion) on
> >how an XML instance document indicates the XML Schema(s) that it
> >conforms to. I am not sure that it is yet clear in people's minds on
> >how to do it. I will take a stab at explaining it, based upon the
> >discussions.
>
> (snip very helpful exposition)
>
> I'm still struggling, however to understand how this is all intended to
> work in an environment which is not continuously connected to the internet.
> Even on machines which are themseleves well connected, it's surely
> unacceptable to have one's data become unusable because the machine in
> Outer Mongolia which holds the schema has crashed.
>
> Note that this is not just a matter of validation, because the schema can
> supply default attribute values. The data can become meaningless in the
> absence of a schema.
>
> I'd hoped to find a statement such as "a general-purpose schema-aware
> processor must provide some catalogue facility which allows the
> specification of a location from which to fetch the schema corresponding to
> an NS URI. Only in the absence of such a catalogue entry may the processor
> attempt to dereference the URI given by the schemaLocation attribute".
As I've tried to convey in other messages in this and related threads,
the XML Schema design is VERY concerned with precisely the issue you
raise above, namely, schema validation should not be a hostage to
connectivity and/or URL stability. Our approach was, however, NOT to
design YACM (Yet Another Catalog Mechanism), but allow for ANY
alternative schema location mechanism which people come up with. I
hope a careful reading of chapter 4 of the PWD [1] will clarify this
for you.
For myself, I envisage schema validators working the in a similar way
to XT, James Clark's XSLT implementation: you will be able to invoke a
schema validator with explicit specification of the schema(s) you wish
applied, or you can leave it to the validator (Not an option XT
provides). The XML Schema PWD allows for one, the other, or both, but
observes that only the schemaLocation approach gives interoperability
(at the price of fragility).
> I'm also puzzled about the semantics of a namespace declaration without a
> corresponding schemaLocation attribute. Does it mean:
>
> (a) Names in the namespace do not have an association to a schema. No
> validation is to be performed (and no attribute defaults are to be supplied).
Certainly not. See chapter 4 again, and the discussion above. The
validator is allowed to dereference the namespace URI, or look it up
in a catalog, or . . .
> (b) Unless the processor provides some alternative method of locating the
> applicable schema, then the data cannot be interpreted and an error occurs.
That will always be true, regardless of how things are specified: a
schema validator confronted with a document with elements in a
namespace for which it neither is given nor can discover a schema will
necessarily declare defeat.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From haustein at ls8.cs.uni-dortmund.de Wed Jan 5 23:25:25 2000
From: haustein at ls8.cs.uni-dortmund.de (Stefan Haustein)
Date: Mon Jun 7 17:19:03 2004
Subject: SAX2 Namespace Support
References: <3.0.6.32.20000104182250.009d3590@mailhost>
Message-ID: <3873154C.836BB19@ls8.cs.uni-dortmund.de>
David Megginson wrote:
>
> > class QName {
> > public:
> > wstring ns () const; // http://www.w3c.org/1999/xhtml
> > wstring name () const; // p
> > wstring nsPrefix () const; // html
> > wstring prefixedName () const; // html:p
> >
> > bool operator== (const QName &rhs) const;
> > // ns & name both equal
> > private:
> > // Probably just a simple pointer to your internal data structures
> > };
>
> My biggest problem with this (and its Java equivalent) is figuring out
> how to handle equality: are two QNames with the same URI part and same
> local part equal? What if the prefix is different?
What about adding a second method "identical
(QName compare)" that takes also the prefix
into account? I think it's consistent if the
default method (equals () / ==) ignores the "noise".
A QName object could also help for the attributes:
If the Sax2 AttributeListImpl is implemented like the
Sax1 list, it would have up to four Vectors:
class AttributeListImpl {
Vector prefixedNames;
Vector localNames;
Vector prefixes;
Vector namespaces;
...
}
Adding an attribute and creating or clearing an
AttributeList (= manipulating four Vectors) would
be extremely expensive.
class AttributeList {
Vector QNames; // better: ArrayList !
Qname getAttribute (int index);
...
}
seems much cheaper, especially if the QName objects are interned.....
Best regards
Stefan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 23:30:48 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
In-Reply-To: "Alan Santos"'s message of "Wed, 5 Jan 2000 14:26:26 -0500"
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com>
Message-ID:
"Alan Santos" writes:
> I'm trying to wrap my head around the XMLSchema drafts to determine their
> immediate usefulness (to myself), and have some very basic questions.
>
> 1) What is the difference between an archetype, type and datatype?
> When is one used in place of the other.
Archetypes are gone. Simple types constraint the string value of
attributes and the string content of textonly elements. Complex types
constrain the content and attributes of any elements. Simple types
are defined via the element; Complex types are defined via
the element.
> 2) Is multiple inheritance not supported for derived types?
No.
> 2a) How is inheritance supported? Is it possible to access the elements of a
> types source without manually doing the traversal, or is inheritance only
> useful in the instance document?
Not sure I understand the question. Derived types 'inherit', with or
without modification, all the constraints of their source type. The
post-schema-validation-infoset includes information about the type
used to validate every element and attribute information item therein.
> 3) Is it possible to use the schema for application specific requirements.
> For example, I'm basing my schema on a Java class model and would like to
> specify the Java class name in the schema. The only way I can see is to
> wrap it in an .
There is a widespread need for this functionality, c.f. the Cambridge
Communique [1]. Schema-internal specification of this information is
not explicitly supported, except as you say in a general way via
, in the current PWD.
> 3a) Likewise, certain may actually refer to another type, so I
> want to do something like:
>
I THINK what you want is to declare an element or attribute as
pointing (via a URL, or IDREF, or keyref) to something of a specified
type. XML Schema as such does not give you this facility with full
generality, although the / facility can achieve something
close to this for on-board links. Validiting such a constraint for
off-board links is outside the scope of XML Schema in my view.
> Maybe I would just be better off with another XML instance document
> describing the class model?
XML Schema is about syntax, not semantics (much). There are languages
designed to describe semantics, e.g. RDF and UML.
ht
[1] http://www.w3.org/TR/1999/schema-arch
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 23:37:01 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
In-Reply-To: Brett McLaughlin's message of "Wed, 05 Jan 2000 13:38:14 -0600"
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net>
Message-ID:
Brett McLaughlin writes:
> Alan Santos wrote:
> >
> > Hi,
> > I'm trying to wrap my head around the XMLSchema drafts to determine their
> > immediate usefulness (to myself), and have some very basic questions.
> >
> > 1) What is the difference between an archetype, type and datatype?
> > When is one used in place of the other.
>
> is gone, replaced by , which is used for specifying
> non-"primitive" (i.e. predefined) types for elements.
>
> is for doing the same sort of operation on attributes.
>
> for example:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
The spirit of the above is entirely correct, there are a few mistakes
in the details. For the overall story, see my reply to the original
post.
The example above is not quite schema-valid, as follows:
>
>
>
>
>
>
^^^^^^^
not allowed on , I guess you want something like
>
>
>
^^^^^^^
again, not quite right, I think you mean source="NMTOKEN"
>
>
>
>
>
>
>
Not surprisingly, I'm more positive about the utility of type
derivation than you are :-).
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 23:41:05 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
In-Reply-To: Brett McLaughlin's message of "Wed, 05 Jan 2000 15:59:02 -0600"
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com> <3873BEA6.F227D928@algx.net>
Message-ID:
Brett McLaughlin writes:
> Alan Santos wrote:
> >
> > > Dah! I'm asleep today... the reason you need is because you can
> > > specify explicit named types:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > There is no way without the element construct to specify a name
> > > for a non-primitive data type without really blowing away any idea of
> > > congruity across the element space. So we have the "type" element.
> > >
> > > Make sense?
> > >
> >
> > Yes it does now.
> >
> > Syntactically it appears to be legal to simply have on it's own,
> > outside of any elements. Is it simply a stylistic difference to define it
> > inside another element?
>
> Nope. This:
>
>
>
>
>
>
>
> is an implicit element type. It is used right there and not
> referenceable by any other element.
Right. I'd call it an anonymous complex type.
> This:
>
>
>
>
>
> is an explicit element type and is referenceable by other elements:
>
>
Right. I'd call it a top-level or named complex type.
> This:
>
>
>
>
>
> is absolutely useless, as it is not referenceable by any other element,
> and is not implicitly assigned to any other element.
Furthermore, it's not allowed: top-level types MUST have a name
attribute. The schema for schemas expresses this constraint.
> Finally, the last permutation:
>
>
>
>
>
>
>
> is legal, and the type is referenceable by other elements, but is bad
> form (IMHO). If you have a type that will be used multiple times, put
> it on its own (explicit type). If it is only used once, use an implicit
> type within the element definition. Things like this are very
> confusing.
First real misunderstanding: this is NOT allowed: only top-level
types can have names. Again, the schema for schemas expresses this
constraint.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Wed Jan 5 23:50:22 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com>
Message-ID: <002501bf57d8$59ee5fd0$5914c897@odi.com>
> There is a widespread need for this functionality, c.f. the Cambridge
> Communique [1]. Schema-internal specification of this information is
> not explicitly supported, except as you say in a general way via
> , in the current PWD.
I'm not familiar with the Cambridge Communique. The link returned a 404.
After a bit of searching, I was able to find references to it in the list
archives. The refrences seem very applicable.
Is it possible you mistyped the link? I'd like to look into it further.
> I THINK what you want is to declare an element or attribute as
> pointing (via a URL, or IDREF, or keyref) to something of a specified
> type. XML Schema as such does not give you this facility with full
> generality, although the / facility can achieve something
> close to this for on-board links. Validiting such a constraint for
> off-board links is outside the scope of XML Schema in my view.
>
Yes, this is what I meant.
The key/keyref is a possibility I hadn't explored.
Thanks for the help,
alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 23:50:50 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:03 2004
Subject: Round 2: How an XML instance document references an XML Schema
In-Reply-To: ht@cogsci.ed.ac.uk's message of "05 Jan 2000 23:18:56 +0000"
References: <3.0.6.32.20000105184943.00aae430@mailhost>
Message-ID:
Oops, forgot my reference for chapter 4 of the PWD [1]. Here it is.
ht
[1] http://www.w3.org/TR/1999/WD-xmlschema-1-19991217/#composition
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Wed Jan 5 23:55:54 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
In-Reply-To: "Alan Santos"'s message of "Wed, 5 Jan 2000 18:55:29 -0500"
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <002501bf57d8$59ee5fd0$5914c897@odi.com>
Message-ID:
Yes, sorry, mistyped the URL for the Cambridge Communique [1].
ht
[1] http://www.w3.org/TR/schema-arch
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Wed Jan 5 23:58:34 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:19:03 2004
Subject: SAX2 Namespace Support
In-Reply-To: Leigh Dodds's message of "Wed, 5 Jan 2000 15:47:06 -0000"
References: <000b01bf5794$1e83e580$ab20268a@pc-lrd.bath.ac.uk>
Message-ID:
Leigh Dodds writes:
> > In principle (the principle of least surprise), it's very bad
> > behaviour for two objects to be == in C++ or equals() in Java if any
> > of their publicly-accessible fields differ. Think of sets, for
> > example.
>
> In this instance though your level of surprise is going to relate
> to how familiar you are with the Namespaces spec.
Expect close to zero, here -- judging by the e-mail I receive, most
people who use SAX haven't even read the XML 1.0 REC much less the
Namespaces REC, and I wouldn't expect them to have done so. After
all, they're programmers who have to deal with XML as one (often
small) part of their work, not XML specialists.
I should note that I've never read the Java Language Specification or
the the Unicode spec (either of them) cover-to-cover, though I work
with Java and Unicode almost daily.
[snip]
> The problem though boils down to how often, in reality, XML instances
> will have the same Namespace declared twice, with different prefixes.
The fact that the bug would be rare makes it worse -- an application
will run perfectly for, say, 18 months, then will suddenly and
inexplicably blow up long after the original programmers have moved on
because one input document happened to declare the same NS twice and
the programmers didn't build in error recovery for that problem.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From francis at redrice.com Thu Jan 6 00:22:37 2000
From: francis at redrice.com (Francis Norton)
Date: Mon Jun 7 17:19:03 2004
Subject: Wish lists for the Holidays
References: <199912290254.TAA00954@localhost.localdomain>
Message-ID: <3873E05C.BF6A380C@redrice.com>
Yes, I'm guessing that the interoperability here depends on using these
two specific implementations. "Architectural" was my hand-wavy way of
saying that I was wondering about a solution that was implementation
independent.
As David Brownell points out, this could be achieved by having an
xpath-in-DOM implementation that ran on top of your DOM. That way your
xpath expressions could return live DOM nodes and you'd avoid DOM bloat.
Though I'm not sure that such a nicely de-coupled approach would be as
efficient as the messier bloatware implementations that do it all in
one?
BTW, I like the factory proposal that you recommended to Lauren Wood to
avoid spec bloat.
Thanks -
Francis.
uche.ogbuji@fourthought.com wrote:
>
> > I get the impression that my desire to have xpath included in the DOM
> > may be naive, but I haven't yet formed a clear picture of the
> > alternatives. Is there an architectural solution which would allow one
> > to plug any arbitrary (but compatible) xpath processor in to a DOM
> > processor? And then use it to select nodes from a document that has been
> > opened in the DOM, and then update those nodes using the DOM?
>
> I don't know whether it's what you term an "architectural solution", but
> 4XPath and 4DOM allow such manipulation right now:
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Thu Jan 6 00:21:28 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net>
Message-ID: <3873E052.310A4731@algx.net>
"Henry S. Thompson" wrote:
>
> Brett McLaughlin writes:
>
> > Alan Santos wrote:
> > >
> > > Hi,
> > > I'm trying to wrap my head around the XMLSchema drafts to determine their
> > > immediate usefulness (to myself), and have some very basic questions.
> > >
> > > 1) What is the difference between an archetype, type and datatype?
> > > When is one used in place of the other.
> >
> > is gone, replaced by , which is used for specifying
> > non-"primitive" (i.e. predefined) types for elements.
> >
> > is for doing the same sort of operation on attributes.
> >
> > for example:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> The spirit of the above is entirely correct, there are a few mistakes
> in the details. For the overall story, see my reply to the original
> post.
>
> The example above is not quite schema-valid, as follows:
>
> >
> >
> >
> >
> >
> >
Sorry, I meant that to be an element, and to be an empty one.
> ^^^^^^^
> not allowed on , I guess you want something like
>
> >
> >
> >
> ^^^^^^^
> again, not quite right, I think you mean source="NMTOKEN"
Yes, of course ;-)
> >
> >
> >
> >
> >
> >
> >
>
> Not surprisingly, I'm more positive about the utility of type
> derivation than you are :-).
You better be, you're on the WG, right? ;-)
-Brett
>
> ht
> --
> Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
> 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
> Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
> URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Thu Jan 6 00:22:46 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com> <3873BEA6.F227D928@algx.net>
Message-ID: <3873E0A5.B17E7756@algx.net>
"Henry S. Thompson" wrote:
>
> Brett McLaughlin writes:
>
> > Alan Santos wrote:
> > >
> > > > Dah! I'm asleep today... the reason you need is because you can
> > > > specify explicit named types:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > There is no way without the element construct to specify a name
> > > > for a non-primitive data type without really blowing away any idea of
> > > > congruity across the element space. So we have the "type" element.
> > > >
> > > > Make sense?
> > > >
> > >
> > > Yes it does now.
> > >
> > > Syntactically it appears to be legal to simply have on it's own,
> > > outside of any elements. Is it simply a stylistic difference to define it
> > > inside another element?
> >
> > Nope. This:
> >
> >
> >
> >
> >
> >
> >
> > is an implicit element type. It is used right there and not
> > referenceable by any other element.
>
> Right. I'd call it an anonymous complex type.
>
> > This:
> >
> >
> >
> >
> >
> > is an explicit element type and is referenceable by other elements:
> >
> >
>
> Right. I'd call it a top-level or named complex type.
>
> > This:
> >
> >
> >
> >
> >
> > is absolutely useless, as it is not referenceable by any other element,
> > and is not implicitly assigned to any other element.
>
> Furthermore, it's not allowed: top-level types MUST have a name
> attribute. The schema for schemas expresses this constraint.
Good, this is new in the 12-17 draft, right? (I was great on the old
one, am getting the new one down ASAP...thanks for help).
>
> > Finally, the last permutation:
> >
> >
> >
> >
> >
> >
> >
> > is legal, and the type is referenceable by other elements, but is bad
> > form (IMHO). If you have a type that will be used multiple times, put
> > it on its own (explicit type). If it is only used once, use an implicit
> > type within the element definition. Things like this are very
> > confusing.
>
> First real misunderstanding: this is NOT allowed: only top-level
> types can have names. Again, the schema for schemas expresses this
> constraint.
Again, good. I know you could do this in archetypes under some parsers
(Schema-valid). Happy to see this was cleared up.
-Brett
>
> ht
> --
> Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
> 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
> Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
> URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bmclaugh at algx.net Thu Jan 6 00:33:54 2000
From: bmclaugh at algx.net (Brett McLaughlin)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com> <3873BEA6.F227D928@algx.net> <002801bf57d2$cb2017d0$5914c897@odi.com>
Message-ID: <3873E33B.41C0539E@algx.net>
Alan Santos wrote:
>
> > >
> > > Syntactically it appears to be legal to simply have on it's own,
>
> Sorry, I meant to say , I'm pretty clear on type now.
> Thanks very much.
>
> You may have missed another question in a previous email....
>
> At one point you had made a critical remark regarding XML schema to model a
> class...
>
> "Your schema is one-to-one with a Java class? This wouldn't be a good
> idea, unless I'm misunderstanding your intent. Maybe your _XML_ is
> based on a class, and it specifies the class, but then multiple XML docs
> (therefore multiple classes) all use the same Schema."
>
> Originally, this is what I was trying to use an XML Schema to do (that is:
> store class info), and use an XML document to store instance values. (Sort
> of a simplified XMI)
I'll be very blunt; I think XML is great as a data representation. I
think it is not quite there for mapping of objects. What you are
talking about, I actually have built to a great extent in XML, so I can
graph Java objects (and instances of those objects) for an XML-RPC
application to talk across a network. I just don't think it is
necessarily there yet.
I still am not sure why you would want this graphing? Even in my
XML-RPC, I found that most times it was worth the cost to completely
graph an object/instance, it was worth using RMI. It was only when
making procedural calls that returned simple primitives or very simple
objects that XML-RPC shone (although it's highly recommended for those
purposes).
Why not use the schema for more of a constraining validation scenario?
It is fairly simple to use almost the exact same XML document to
represent both an object in general and an instance of said object. In
fact, I could create a dirty XML map of an object, that could be
"extended" (in this case, I mean elements added/attributes changed)
without changing the original elements to represent any given instance.
Then my schema is across all Java objects, ensuring that other apps can
"understand" and de-map what I am sending them. All in all, a better
solution, I think. Certainly faster... schema validation ain't quick
yet ;-) Although with SAX2 I know that will improve much (b/c of
standard interface - more heads = better solutions).
>
> I'm not sure I can do this, in any manner that doesn't break XML schemas.
> There doesn't appear to be a mechanism in place to expand the functionality
> of XML-Schemas
As Henry pointed out, there are what I would consider "hacks" and
"back-doors" that make it *possible*.
>
> But if it is possible, I'm interested in why you feel this is a bad idea?
I think you are better to do this sort of thing in raw Java. Of course,
I still haven't seen what you are trying to accomplish, so maybe that
would help ;-)
-Brett
>
> (BTW, I think this is similar to what was done with Quick)
>
> Finally, .
>
> thanks,
> alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From asantos at odi.com Thu Jan 6 03:54:48 2000
From: asantos at odi.com (Alan Santos)
Date: Mon Jun 7 17:19:03 2004
Subject: Basic XMLSchema questions
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com> <3873BEA6.F227D928@algx.net> <002801bf57d2$cb2017d0$5914c897@odi.com> <3873E33B.41C0539E@algx.net>
Message-ID: <006201bf57fa$809fcca0$5914c897@odi.com>
> I think you are better to do this sort of thing in raw Java. Of course,
> I still haven't seen what you are trying to accomplish, so maybe that
> would help ;-)
>
I'm building something very similar to what you have described.
Here's a quick list of my requirements:
1) We need to be able to create/modify the contents of an OODBMS (Which is
either Java/C++ classes and instances, and more dynamic structures modeled
to look like a Java/c++ class/instance) in a non-programmatic manner
2) Dump/load the database contents to/from text
3) Ship data around via CORBA, RMI or http (We don't want to dictate the
transport mechanism) to clients written in an unknown language
4) Import data into various editors or viewers (including browsers).
Number 3 is the most critical, and also most useful to applications outside
my particular implementation.
So obviously I don't need to explain, but the big issue is the need to
verify that data described via XML is 'correct' (e.g. modeled classes
contain the correct members and members are the correct type) and uniform
across and within all documents that are used.
This was solved in the past by creating my own XMLschema like document. I
was hoping to implement in a more standard manner this time around. I
think XMI is that standard manner (it's been submitted to the OMG), but it's
way more complex than I need, and it's about twice as long as the XML Schema
standard. Sun is also doing something similar.
I'd love to hear your thoughts on this, but it may be better to take the
discussion of the list, as we may be straying from it's purpose, and this
list has enough traffic already :)
thanks,
alan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From uche.ogbuji at fourthought.com Thu Jan 6 04:14:39 2000
From: uche.ogbuji at fourthought.com (uche.ogbuji@fourthought.com)
Date: Mon Jun 7 17:19:03 2004
Subject: SAX2: Namespace Processing and NSUtils helper class
In-Reply-To: Your message of "Wed, 05 Jan 2000 11:41:05 PST."
<38739E51.973765FA@pacbell.net>
Message-ID: <200001060414.VAA05483@localhost.localdomain>
> Tim Bray wrote:
> > At 10:32 AM 1/5/00 -0800, David Brownell wrote:
> > >Namespace URIs clearly have three kinds of values, not that
> > >it's specified in the namespace spec very clearly (and I suspect DOM L2
> > >may need tweaking to get this right):
> > >
> > > - Undeclared (null?)
> > > - Declared as no-value (empty string, "")
> > > - Some URI (the case folk focus on).
> >
> > No. The second case is explicitly ruled out by the namespace spec. Check
> > sections 2 and 5.2 of the namespace spec.
>
> I think you've gotten confused by the multiple iterations on this
> topic. Likely not the only person!
To my reading, you're the one confused. You explicitly said that "Namespace
URIs clearly have three kinds of values..." and went on to list one of them as
'Declared as no-value (empty string, "")', implying, to my mind, that SAX must
deal with this case. Tim rejoined that this case is erroneous, implying to my
mind that it need not be dealt with in the SAX interface, but in
error-handling. I think Tim's clarification has eliminated a lot of the
difficulty you were making about David Megginson's latest proposal.
--
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com (970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com http://OpenTechnology.org
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From uche.ogbuji at fourthought.com Thu Jan 6 04:21:46 2000
From: uche.ogbuji at fourthought.com (uche.ogbuji@fourthought.com)
Date: Mon Jun 7 17:19:03 2004
Subject: Wish lists for the Holidays
In-Reply-To: Your message of "Thu, 06 Jan 2000 00:22:52 GMT."
<3873E05C.BF6A380C@redrice.com>
Message-ID: <200001060421.VAA05509@localhost.localdomain>
> As David Brownell points out, this could be achieved by having an
> xpath-in-DOM implementation that ran on top of your DOM. That way your
> xpath expressions could return live DOM nodes and you'd avoid DOM bloat.
> Though I'm not sure that such a nicely de-coupled approach would be as
> efficient as the messier bloatware implementations that do it all in
> one?
I very often run into non-rigourous invocations of "DOM bloat". Note that DOM
is a very large interface, but there is no reason that implementations have to
be large as well.
> BTW, I like the factory proposal that you recommended to Lauren Wood to
> avoid spec bloat.
I wish I could take credit for the excellent idea, but I can't. Leigh Dodds
is the scurvy scoundrel in this case.
--
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com (970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com http://OpenTechnology.org
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From lauren at sqwest.bc.ca Thu Jan 6 04:45:51 2000
From: lauren at sqwest.bc.ca (Lauren Wood)
Date: Mon Jun 7 17:19:03 2004
Subject: WISH! Open Source XML Editor
In-Reply-To: <3.0.1.32.19991224135813.009b9380@pop3.demon.co.uk>
References:
Message-ID: <200001060440.UAA16322@mail.sqwest.bc.ca>
On 24 Dec 99, at 13:58, Peter Murray-Rust wrote:
> The lack of an API for an editor effectively makes it impossible for people
> to develop a modular approach. Many of the "non-textual" DTD/schemas will
> require specialist editors (my own interest is chemistry, but Math,
> Geography/maps, SVG, etc are all similar). We need to be able to
> concentrate *just* on the domain-specific parts of our subject, and not to
> be concerned with general structural or technical editing.
What do you need that you don't get from, for example, the DOM +
the SVG DOM for editing SVG? I've been encouraging anyone who
will listen to me to define their own DTD/schema-specific DOMs on
top of the DOM for domain-specific work; MathML, SVG and SMIL
are all doing this, for example, and I see no reason why others
shouldn't as well.
Lauren
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Thu Jan 6 04:47:48 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:03 2004
Subject: Wish lists for the Holidays
References: <200001060421.VAA05509@localhost.localdomain>
Message-ID: <38741E55.4887CC90@pacbell.net>
uche.ogbuji@fourthought.com wrote:
>
> > As David Brownell points out, this could be achieved by having an
> > xpath-in-DOM implementation that ran on top of your DOM. That way your
> > xpath expressions could return live DOM nodes and you'd avoid DOM bloat.
> > Though I'm not sure that such a nicely de-coupled approach would be as
> > efficient as the messier bloatware implementations that do it all in
> > one?
>
> I very often run into non-rigourous invocations of "DOM bloat". Note that
> DOM is a very large interface,
... and constantly adding more functionality to it is the "bloat"
to which I referred. The point's been raised that some of the
current functionality might well be completed, before adding any
newer functionality. (Everything DTD-related is incomplete, since
one can't start with an empty DOM tree and add those functionalities
without requiring proprietary extensions.)
There's a concept called "software layering" that I adhere to -- I'm
sure you know it well. Modules can use DOM without being bundled into
DOM itself. XPath can (and IMHO should) be such a layer.
- Dave
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From lenst at lysator.liu.se Thu Jan 6 07:59:51 2000
From: lenst at lysator.liu.se (Lennart Staflin)
Date: Mon Jun 7 17:19:03 2004
Subject: PSGML-1.2.1 problems
In-Reply-To: Eoin Lane's message of "Mon, 06 Dec 1999 15:01:28 +0000"
References: <384BCFC8.25F7721E@esatclear.ie>
Message-ID:
[Eoin Lane]
| I'm trying to write a xml doc with emacs configured to use psgml-1.2.1
| but am having some problems. I have checked that psgml works with a
| simple dtd. However when I use the dtd (document-v10.dtd) below I get
| the following error.
|
| ~/character.ent line 2 col 12 entity common.att
| ~/document-v10.dtd line 218 col 29 entity DOCUMENT
| ~/installing.xml line 3 col 51
| Name expected; at: :lang
The error suggests that the dtd is parsed with the normal SGML syntax
instead of the XML syntax. Could it be that buffer with
"installing.xml" is using sgml-mode instead of xml-mode?
(The "~/character.ent" in the first line of the error message is
misleading. Bug some where :)
--
Lennart Staflin /*/ (:ABSOLUTE :WILD)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From vinokurov at mail.ru Thu Jan 6 10:36:13 2000
From: vinokurov at mail.ru (Nikita Vinokurov)
Date: Mon Jun 7 17:19:03 2004
Subject: XMLSchema implementation
Message-ID: <00010613391200.04124@sorokin.rphys.mipt.ru>
Hi !
I would like to know is there any good implementation of XMLSchema nodes
in terms of Java classes.
It is very interesting to parse XMLSchema document and build on its base
the Objects hierarchy like DOM?
Many thanks.
--
Nikita Vinokurov
Project Manager
YAGEL Open Source company
http://yagel.newmail.ru
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From haustein at ls8.cs.uni-dortmund.de Thu Jan 6 10:41:35 2000
From: haustein at ls8.cs.uni-dortmund.de (Stefan Haustein)
Date: Mon Jun 7 17:19:03 2004
Subject: WISH! Open Source XML Editor
References: <200001060440.UAA16322@mail.sqwest.bc.ca>
Message-ID: <38747134.270D09FE@ls8.cs.uni-dortmund.de>
Lauren Wood wrote:
>
> > The lack of an API for an editor effectively makes it impossible for people
> > to develop a modular approach. Many of the "non-textual" DTD/schemas will
> > require specialist editors (my own interest is chemistry, but Math,
> > Geography/maps, SVG, etc are all similar). We need to be able to
> > concentrate *just* on the domain-specific parts of our subject, and not to
> > be concerned with general structural or technical editing.
>
> What do you need that you don't get from, for example, the DOM +
> the SVG DOM for editing SVG? I've been encouraging anyone who
> will listen to me to define their own DTD/schema-specific DOMs on
> top of the DOM for domain-specific work; MathML, SVG and SMIL
> are all doing this, for example, and I see no reason why others
> shouldn't as well.
I think what Peter was talking about is an editing interface where
specialized editors can hook in, and that provides a general default
editor where the specialization is not needed.
Something you feed a DOM node in and get e.g. a JComponent out. You can
register your own constructors for elements, and if you don't, you get a
default
JComponent.
something like
class DOMEditorFactory {
registerElementEditor (Sring namespace, String name, Class
editorClass);
JComponent createEditor (Node node);
}
The registered class would be required to implement a constructor
that takes a pointer back to the factory and a DOM element as input.
An editor for a node can ask the factory for editors of it's
childs when it is expanded.
If context-dependent or non-default editors for other than element nodes
are required, the parent element needs to build the corresponding
component itself. Another possibility would be subclassing the
factory and overwriting createEditor.
Best regards
Stefan
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From James.Anderson at mecomnet.de Thu Jan 6 11:32:42 2000
From: James.Anderson at mecomnet.de (james anderson)
Date: Mon Jun 7 17:19:03 2004
Subject: schemas: why no local type bindings?
References: <01cf01bf57b2$c3d53bb0$de4c340c@odi.com> <38739DA6.D844DBC7@algx.net> <004e01bf57ba$54cce170$5914c897@odi.com> <3873B401.BB59B080@algx.net> <3873B7E7.C320C504@algx.net> <004201bf57c7$d69aa270$5914c897@odi.com> <3873BEA6.F227D928@algx.net>
Message-ID: <38747E9D.ADF646DB@mecomnet.de>
i'm working my way into schemas and found the distinction between anonymous
and names types baroque. i need to read further to see what named types can
mean, beyond that which the equivalent entity based definitions would have accomplished.
given, however, that they exist, why pray-tell would one then proscribe local
definitions? wouldn't there just as well be cases where such resemblances
would occur within elements as well as at a global level?
> > Finally, the last permutation:
> >
> >
> >
> >
> >
> >
> >
> > is legal, and the type is referenceable by other elements, but is bad
> > form (IMHO). If you have a type that will be used multiple times, put
> > it on its own (explicit type). If it is only used once, use an implicit
> > type within the element definition. Things like this are very
> > confusing.
>
> First real misunderstanding: this is NOT allowed: only top-level
> types can have names. Again, the schema for schemas expresses this
> constraint.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From peter at ursus.demon.co.uk Thu Jan 6 12:05:15 2000
From: peter at ursus.demon.co.uk (Peter Murray-Rust)
Date: Mon Jun 7 17:19:03 2004
Subject: DOM and editing [was WISH!...]
In-Reply-To: <200001060440.UAA16322@mail.sqwest.bc.ca>
References: <3.0.1.32.19991224135813.009b9380@pop3.demon.co.uk>
Message-ID:
At 08:37 PM 1/5/00 -0800, Lauren Wood wrote:
>On 24 Dec 99, at 13:58, Peter Murray-Rust wrote:
>
>> The lack of an API for an editor effectively makes it impossible for people
>> to develop a modular approach. Many of the "non-textual" DTD/schemas will
>> require specialist editors (my own interest is chemistry, but Math,
>> Geography/maps, SVG, etc are all similar). We need to be able to
>> concentrate *just* on the domain-specific parts of our subject, and not to
>> be concerned with general structural or technical editing.
>
>What do you need that you don't get from, for example, the DOM +
>the SVG DOM for editing SVG? I've been encouraging anyone who
>will listen to me
Of course I listen!
>to define their own DTD/schema-specific DOMs on
>top of the DOM for domain-specific work; MathML, SVG and SMIL
>are all doing this, for example, and I see no reason why others
>shouldn't as well.
I am indeed doing this! I have specified and implemented a first pass at
CMLDOM using DOM-1. I ran into a number of problems when building/editing
the DOM. I have been using two implementations, xml-tr2 from SUN and xml4j
(now Xerces). Each of these had extended the DOM interface with methods
such as
setTagName() and
setOwnerDocument()
which I found to be essential for editing. In doing so the 2
implementations diverged and I could not easily extend one without losing
the ability to switch to the other if necessary. (I appreciate that this is
one of the problems that SAXON tackled). I therefore did not have an
implementation of CMLDOM that could be switched from one implementation to
the other. effectively this means that I would have to rewrite the
interface for different editors
If these and related problems are solved in DOM2 I shall be delighted!
DOM2, however, specifically suggests that the interface can be extended,
and it is these extensions that I am afraid of.
P.
>
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From john.aldridge at informatix.co.uk Thu Jan 6 12:20:19 2000
From: john.aldridge at informatix.co.uk (John Aldridge)
Date: Mon Jun 7 17:19:03 2004
Subject: Round 2: How an XML instance document references an XML
Schema
In-Reply-To:
References:
<3.0.6.32.20000105184943.00aae430@mailhost>
Message-ID: <3.0.6.32.20000106121920.00c073c0@mailhost>
At 23:18 05/01/00 +0000, ht@cogsci.ed.ac.uk (Henry S. Thompson) wrote:
>John Aldridge writes:
>> I'd hoped to find a statement such as "a general-purpose schema-aware
>> processor must provide some catalogue facility which allows the
>> specification of a location from which to fetch the schema corresponding to
>> an NS URI. Only in the absence of such a catalogue entry may the processor
>> attempt to dereference the URI given by the schemaLocation attribute".
>
>As I've tried to convey in other messages in this and related threads,
>the XML Schema design is VERY concerned with precisely the issue you
>raise above, namely, schema validation should not be a hostage to
>connectivity and/or URL stability. Our approach was, however, NOT to
>design YACM (Yet Another Catalog Mechanism), but allow for ANY
>alternative schema location mechanism which people come up with. I
>hope a careful reading of chapter 4 of the PWD [1] will clarify this
>for you.
I did carefully read Chapter 4, honest, but still struggled to understand
the way the flexibility it includes should be used. Note that I did not
suggest above that the document should include a specific catalogue design;
just that I'd hoped it would mandate the existence of _some_ catalogue.
>For myself, I envisage schema validators working the in a similar way
>to XT, James Clark's XSLT implementation: you will be able to invoke a
>schema validator with explicit specification of the schema(s) you wish
>applied,
By which you mean (I think) "explicit specification of _how to locate_ the
schema(s) you wish applied,". Presumably you are not intended to be able
to request that elements be validated against a schema with a
targetNamespace which does not match the namespace from which the elements
to be validated are drawn?
> or you can leave it to the validator (Not an option XT
>provides). The XML Schema PWD allows for one, the other, or both, but
>observes that only the schemaLocation approach gives interoperability
>(at the price of fragility).
OK, that's very helpful. So, when writing an XML file, I should start it:
:
And then say to the customers for this data:
You must process this data either
(a) in an environment with reliable access to
http://www.informatix.co.uk/Stuff/Stuff.xsd (in which case you
may use any "general-purpose schema-aware" XML processor), or,
(b) you are constrained to use only those XML processors which
allow you to specify that the schema for the namespace
http://www.informatix.co.uk/Stuff is to be found in some other
location accessible to you.
In the context of the obligation "...unless directed otherwise
general-purpose schema-aware processors must attempt to dereference each
schema URI...", the existance of a catalogue or other mechanism for
locating a schema counts as "directed otherwise".
I guess I'm just suspicious that, in the absence of specific requirements,
processors will not bother to implement an such alternative mechanism.
After all, the language quoted in the previous paragraph is very similar to
that describing DTD links: "An XML processor ... may use the public
identifier to try to generate an alternative URI. If the processor is
unable to do so, it must use the URI specified in the system literal".
How many DTD-aware processors actually do provide a public identifier based
lookup mechanism?
I also wrote, on what I now believe to be a different topic:
>> I'm also puzzled about the semantics of a namespace declaration without a
>> corresponding schemaLocation attribute. Does it mean:
(snip)
>> (b) Unless the processor provides some alternative method of locating the
>> applicable schema, then the data cannot be interpreted and an error occurs.
>
>That will always be true, regardless of how things are specified: a
>schema validator confronted with a document with elements in a
>namespace for which it neither is given nor can discover a schema will
>necessarily declare defeat.
I guess I was really confused about the relation between schemas and
namespaces.
I understand your answer to mean that by using a name from a namespace, and
then using a schema-aware processor, you are automatically claiming that
the element conforms to the schema for that namespace.
There is no such thing, to a schema-aware processor, as a namespace without
an associated schema.
Thanks for your help, both here and on other topics to which I've not
contributed but have followed with interest.
--
Cheers,
John
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From costello at mitre.org Thu Jan 6 12:44:45 2000
From: costello at mitre.org (Roger L. Costello)
Date: Mon Jun 7 17:19:03 2004
Subject: ANN: XML Schema Tutorial
Message-ID: <38748E79.F83182B6@mitre.org>
Hi Folks,
With a lot of help from this list community and many hours studying the
spec, I have created a tutorial on the latest draft (12-17-99) of the
XML Schema spec. It is freely available at:
I personally learn best with examples, so the tutorial contains quite a
few examples to demonstrate various features.
I hope that you find the tutorial beneficial. If you find any errors,
ommissions, or have suggestions on how to improve it I would appreciate
your feedback so that I may fix/improve it.
I would like to again give special thanks to the following people who
patiently answered my seemingly endless questions:
- Henry Thompson
- Andrew Layman
- Noah Mendelsohn
- David Beech
- Rick Jelliffe
/Roger
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Thu Jan 6 13:49:08 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:03 2004
Subject: Round 2: How an XML instance document references an XML Schema
In-Reply-To: John Aldridge's message of "Thu, 06 Jan 2000 12:19:20 +0000"
References: <3.0.6.32.20000105184943.00aae430@mailhost> <3.0.6.32.20000106121920.00c073c0@mailhost>
Message-ID:
John Aldridge writes:
> At 23:18 05/01/00 +0000, ht@cogsci.ed.ac.uk (Henry S. Thompson) wrote:
> >John Aldridge writes:
>
> >> I'd hoped to find a statement such as "a general-purpose schema-aware
> >> processor must provide some catalogue facility which allows the
> >> specification of a location from which to fetch the schema corresponding to
> >> an NS URI. Only in the absence of such a catalogue entry may the processor
> >> attempt to dereference the URI given by the schemaLocation attribute".
> >
> >As I've tried to convey in other messages in this and related threads,
> >the XML Schema design is VERY concerned with precisely the issue you
> >raise above, namely, schema validation should not be a hostage to
> >connectivity and/or URL stability. Our approach was, however, NOT to
> >design YACM (Yet Another Catalog Mechanism), but allow for ANY
> >alternative schema location mechanism which people come up with. I
> >hope a careful reading of chapter 4 of the PWD [1] will clarify this
> >for you.
>
> I did carefully read Chapter 4, honest, but still struggled to understand
> the way the flexibility it includes should be used. Note that I did not
> suggest above that the document should include a specific catalogue design;
> just that I'd hoped it would mandate the existence of _some_ catalogue.
>
> >For myself, I envisage schema validators working the in a similar way
> >to XT, James Clark's XSLT implementation: you will be able to invoke a
> >schema validator with explicit specification of the schema(s) you wish
> >applied,
>
> By which you mean (I think) "explicit specification of _how to locate_ the
> schema(s) you wish applied,". Presumably you are not intended to be able
> to request that elements be validated against a schema with a
> targetNamespace which does not match the namespace from which the elements
> to be validated are drawn?
Both points correct: how to _locate_, and targetNamespaces must
always match (except in the case where there is none, but that's
another can of worms).
> > or you can leave it to the validator (Not an option XT
> >provides). The XML Schema PWD allows for one, the other, or both, but
> >observes that only the schemaLocation approach gives interoperability
> >(at the price of fragility).
>
> OK, that's very helpful. So, when writing an XML file, I should start it:
>
>
> xmlns="http://www.informatix.co.uk/Stuff"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
> xsi:schemaLocation="http://www.informatix.co.uk/Stuff
> http://www.informatix.co.uk/Stuff/Stuff.xsd"
> >
> :
>
>
> And then say to the customers for this data:
>
> You must process this data either
>
> (a) in an environment with reliable access to
> http://www.informatix.co.uk/Stuff/Stuff.xsd (in which case you
> may use any "general-purpose schema-aware" XML processor), or,
>
> (b) you are constrained to use only those XML processors which
> allow you to specify that the schema for the namespace
> http://www.informatix.co.uk/Stuff is to be found in some other
> location accessible to you.
Yes.
> In the context of the obligation "...unless directed otherwise
> general-purpose schema-aware processors must attempt to dereference each
> schema URI...", the existance of a catalogue or other mechanism for
> locating a schema counts as "directed otherwise".
Well, not the existence alone, but the existence plus some indication,
from user or application choice, to use what exists.
> I guess I'm just suspicious that, in the absence of specific requirements,
> processors will not bother to implement an such alternative mechanism.
> After all, the language quoted in the previous paragraph is very similar to
> that describing DTD links: "An XML processor ... may use the public
> identifier to try to generate an alternative URI. If the processor is
> unable to do so, it must use the URI specified in the system literal".
You can't make people provide interoperable solutions, only encourage
them to do so, you're right.
> . . .
>
> I guess I was really confused about the relation between schemas and
> namespaces.
>
> I understand your answer to mean that by using a name from a namespace, and
> then using a schema-aware processor, you are automatically claiming that
> the element conforms to the schema for that namespace.
>
> There is no such thing, to a schema-aware processor, as a namespace without
> an associated schema.
That's close, but there are undoubtedly some grey areas. In the
simplest case: a schema-validator is validating the content of some
element with a schema for its namespace and encounters an element name
from a different namespace. What happens? If neither schemaLocation
nor built-in information nor namespace-URI-based search yield a
schema, there is a problem. Let's look a little harder at how this
could happen.
1) The instance looks like this
...
...
The content model the validator is working with, within a schema for
the uri:a namespace, looks like this:
Now this latter reference is not allowed unless there's an
statement for it. But that may not contain a
'schemaLocation' attribute, or the URI specified there may not be
accessible, etc. At that point an error should be raised.
2) The instance is the same, but the relevant content model looks like
this:
This, and related cases, are the grey area mentioned above. The WG
has not yet decided exactly what the detailed schema-validation story
is wrt validation within material which in the first instance is
allowed by a wildcard particle in a content model.
> Thanks for your help, both here and on other topics to which I've not
> contributed but have followed with interest.
You're welcome: you, and the rest of xml-dev, are our launch
customers. . . :-)
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dpotter at mitre.org Thu Jan 6 15:11:30 2000
From: dpotter at mitre.org (Daniel Potter)
Date: Mon Jun 7 17:19:03 2004
Subject: XML Schema Datatype Questions
References: <002601bf5811$27ea0640$ed6b1b18@houston.rr.com>
Message-ID: <3874B0D8.2089A6D1@mitre.org>
My basic question was really how to include NaN in ranges (although
that's not quite how I phrased it, sorry). Basically, when I'm writing
a class that implements a datatype, it contains all the facets with
"default" values. It sets the min/max values to positive/negative
infinity appropriately (as they are represented internally by floats).
Unfortunately, since all range operations (<, >, etc.) all return false
when NaN is encountered, this means that a need another way of
indicating NaN is legal.
The real problem and what I really meant to ask is how to indicate NaN
should or shouldn't be included (same as your last question). I can
imagine times when a schema writer would wish to include NaN in a given
range. A simple example would be using NaN to indicate a float value is
unknown; in a math oriented schema, it might be needed to indicate that
no representable answer was generated. There are also times when NaN
should not be included, and this is not necessarily all times when there
is a given range to the values.
Curt Arnold wrote:
[snip]
>
> With the exception of the enumeration facet, all the other facets appear to
> form one big AND. I'd say the logical formulation is all of the
> non-enumeration facets must be true and one of the enumeration facets must
> be true and you must acceptible to the base type. (This distinct treatment
> of enumeration is undesirable in my eye. I'd like something closer to the
> previous form or my earlier suggestion
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0022.html where the entire enumeration is one facet and the specific literals are
> child elements of it. I'm planning on updating that suggestion for the new
> draft.).
I like that suggestion. Something like:
1
2
NaN
? Seems like it would look nicer too.
>
> For example,
>
>
>
>
>
>
>
> should have an empty lexical space. Only NaN passes the enumeration test
> and it is not in the range specified. Your scenario requires some sort of
> "or" facet and "and" facet.
>
>
>
>
>
>
>
>
>
>
>
> Note: If we were to do that, then add a element to. That would make
> it simple to disallow a previous enumeration value: such as
>
>
>
>
>
>
>
> There is no constraint saying that
> > > enumeration and min/max
> > > values cannot be set together, which leads me to
> > > believe that they are
> > > combined to describe legal values.)
>
> With the previous interpretation, you should be able to have any combination
> of facets but they are interpreted as a big AND. With that explicit
> interpretation, we don't have any ambiguity is someone specifies both a
> minInclusive and a minExclusive and don't have to try to figure which one to
> keep, we can just evaluation both and they both better be true. Just like
> Java or C++ would allow you to do
>
> if(x > 3 && x >= 4)
>
> The behavior is defined, though the duplicate specification comes at slight
> performance penalty.
This is exactly where I was coming from: creating a datatype with no
legal values by enumerating only illegal values. According to Ashok
Malhotra in an answer to basically this same question, this is illegal
because it is conflict between facet values (similar to multiple
max(In|Ex)clusive statements).
I think that , , and sections make sense. There is no
other way to constrain a Mon-Friday type into a Mon-Thur type, although
conceivably Mon-Friday is an extension of Mon-Thur. But if Mon-Friday
is the datatype from the base schema which someone is basing a new
schema on, then being able to restrict it even further would definately
be useful.
> > > Also relating to float, are the characters case
> > > sensitive? Can I use
> > > "inf" as a value or does it need to be "INF"? Is
> > > "6.22e22" legal? Or
> > > does it need to be "6.22E22"?
>
> Formulation [34] would indicate that both 6.22e22 and 6.22E22 are legal.
> Formulations [31] and [32] would indicate that the only legal representation
> of infinity is INF and of not an number is NaN (which is inconsistent with
> section 3.2.4.1 which states NAN)
I missed the formulation section when writing that question (oops).
Thanks for pointing it out!
So which is correct, then, NaN or NAN? I'm guessing NaN.
> > > One last question: For the binary datatype, what is
> > > the default
> > > encoding?
> > >
>
> Someone should put a default in or make the encoding a required attribute.
I don't think that it can be made required:
is legal, and since type might be something other than binary, requiring
encoding would be useless. Since encoding would be specified doing
something like:
There really ought to be a default encoding so that simply declaring an
element of type binary is meaningful. I would suggest hex as the
default, since most binary data in XML is more than likely going to be
short and HEX is closer to being human-readable than Base64.
>
> Now for my question, what is the appropriate way to disallow NaN from a
> datatype without constraining the dataspace. I'd try the following, but
> maybe should be an explicit solution (or if this one is okay it should be
> added in the draft or some errata)
>
>
>
>
I don't really like the idea that specifying a range eliminates NaN
completely. As stated above, NaN may be desirable even in a constrained
range. I would suggest instead another facet which specifies whether or
not NaN can be included, or using the sections which
you suggested above.
- Dan Potter
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dhunter at Mobility.com Thu Jan 6 15:38:30 2000
From: dhunter at Mobility.com (Hunter, David)
Date: Mon Jun 7 17:19:04 2004
Subject: SAX2 Namespace Support
Message-ID: <805C62F55FFAD1118D0800805FBB428D02BC0224@cc20exch2.mobility.com>
From: David Megginson [mailto:david@megginson.com]
Sent: Wednesday, January 05, 2000 6:58 PM
> > The problem though boils down to how often, in reality, XML
> instances
> > will have the same Namespace declared twice, with different
> prefixes.
>
> The fact that the bug would be rare makes it worse -- an application
> will run perfectly for, say, 18 months, then will suddenly and
> inexplicably blow up long after the original programmers have moved on
> because one input document happened to declare the same NS twice and
> the programmers didn't build in error recovery for that problem.
I don't want to flog any dead horses, so I hope this hasn't been covered
already, but is it really an error to have the same namespace declared
twice, with different prefixes? i.e., is the following really not legal
John
Smith
And, if that is illegal, is the following legal:
I looked through the Namespace spec, but couldn't find anything making this
illegal, so did I miss something, or did I misunderstand the conversation?
(Both equally likely.)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ht at cogsci.ed.ac.uk Thu Jan 6 15:53:14 2000
From: ht at cogsci.ed.ac.uk (Henry S. Thompson)
Date: Mon Jun 7 17:19:04 2004
Subject: ANN: XML Schema Tutorial
In-Reply-To: "Roger L. Costello"'s message of "Thu, 06 Jan 2000 07:45:46 -0500"
References: <38748E79.F83182B6@mitre.org>
Message-ID:
Thank you, Roger, I think your tutorial is excellent. I didn't see
ANY conceptual errors, and only a very few typoes in a quick
read-through.
"Roger L. Costello" writes:
> With a lot of help from this list community and many hours studying the
> spec, I have created a tutorial on the latest draft (12-17-99) of the
> XML Schema spec. It is freely available at:
>
>
>
> I personally learn best with examples, so the tutorial contains quite a
> few examples to demonstrate various features.
>
> I hope that you find the tutorial beneficial. If you find any errors,
> ommissions, or have suggestions on how to improve it I would appreciate
> your feedback so that I may fix/improve it.
>
> I would like to again give special thanks to the following people who
> patiently answered my seemingly endless questions:
>
> - Henry Thompson
> - Andrew Layman
> - Noah Mendelsohn
> - David Beech
> - Rick Jelliffe
You're welcome -- your efforts repay more than repay our input.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ldodds at ingenta.com Thu Jan 6 15:55:46 2000
From: ldodds at ingenta.com (Leigh Dodds)
Date: Mon Jun 7 17:19:04 2004
Subject: SAX2 Namespace Support
In-Reply-To: <805C62F55FFAD1118D0800805FBB428D02BC0224@cc20exch2.mobility.com>
Message-ID: <003201bf585e$791124c0$ab20268a@pc-lrd.bath.ac.uk>
> -----Original Message-----
> From: owner-xml-dev@ic.ac.uk [mailto:owner-xml-dev@ic.ac.uk]On Behalf Of
> Hunter, David
> Sent: 06 January 2000 15:37
> To: 'David Megginson'; xml-dev
> Subject: RE: SAX2 Namespace Support
> I don't want to flog any dead horses, so I hope this hasn't been covered
> already, but is it really an error to have the same namespace declared
> twice, with different prefixes? i.e., is the following really not legal
>
> xmlns:p2="urn:person:000-000-000">
> John
> Smith
>
No its not illegal, its perfectly valid according to the spec.
Just nonsensical (at least to me).
The discussion is relating to the point of whether the
QNames of the following QNames should compare equal in the Java:
{"p1", "first", "urn:person:000-000-000"}
{"p2", "first", "urn:person:000-000-000"}
If you've read the spec, then the answer seems yes. The
debate is still open as to what the 'expected' behaviour
might be in an == or equals() operation.
> And, if that is illegal, is the following legal:
>
> xmlns:p1="urn:person:000-000-000">
>
Thats legal too.
L.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From Curt.Arnold at hyprotech.com Thu Jan 6 15:55:35 2000
From: Curt.Arnold at hyprotech.com (Arnold, Curt)
Date: Mon Jun 7 17:19:04 2004
Subject: XML Schema Datatype Questions
Message-ID: <00E567D938B9D311ACEC00A0C9B468730C7461@THOR>
There was a discussion of disjoint ranges in the previous two comments
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0034.html
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0040.html
I'd build a datatype that is restricted to 3 <= x <= 4 or x == NaN by something like (using the and elements discussed in earlier messages.
-----Original Message-----
From: Daniel Potter [mailto:dpotter@mitre.org]
Sent: Thursday, January 06, 2000 9:12 AM
To: Curt Arnold; xml-dev@ic.ac.uk; www-xml-schema-comments@w3.org
Subject: Re: XML Schema Datatype Questions
My basic question was really how to include NaN in ranges (although
that's not quite how I phrased it, sorry). Basically, when I'm writing
a class that implements a datatype, it contains all the facets with
"default" values. It sets the min/max values to positive/negative
infinity appropriately (as they are represented internally by floats).
Unfortunately, since all range operations (<, >, etc.) all return false
when NaN is encountered, this means that a need another way of
indicating NaN is legal.
The real problem and what I really meant to ask is how to indicate NaN
should or shouldn't be included (same as your last question). I can
imagine times when a schema writer would wish to include NaN in a given
range. A simple example would be using NaN to indicate a float value is
unknown; in a math oriented schema, it might be needed to indicate that
no representable answer was generated. There are also times when NaN
should not be included, and this is not necessarily all times when there
is a given range to the values.
Curt Arnold wrote:
[snip]
>
> With the exception of the enumeration facet, all the other facets appear to
> form one big AND. I'd say the logical formulation is all of the
> non-enumeration facets must be true and one of the enumeration facets must
> be true and you must acceptible to the base type. (This distinct treatment
> of enumeration is undesirable in my eye. I'd like something closer to the
> previous form or my earlier suggestion
> http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0022.html where the entire enumeration is one facet and the specific literals are
> child elements of it. I'm planning on updating that suggestion for the new
> draft.).
I like that suggestion. Something like:
1
2
NaN
? Seems like it would look nicer too.
>
> For example,
>
>
>
>
>
>
>
> should have an empty lexical space. Only NaN passes the enumeration test
> and it is not in the range specified. Your scenario requires some sort of
> "or" facet and "and" facet.
>
>
>
>
>
>
>
>
>
>
>
> Note: If we were to do that, then add a element to. That would make
> it simple to disallow a previous enumeration value: such as
>
>
>
>
>
>
>
> There is no constraint saying that
> > > enumeration and min/max
> > > values cannot be set together, which leads me to
> > > believe that they are
> > > combined to describe legal values.)
>
> With the previous interpretation, you should be able to have any combination
> of facets but they are interpreted as a big AND. With that explicit
> interpretation, we don't have any ambiguity is someone specifies both a
> minInclusive and a minExclusive and don't have to try to figure which one to
> keep, we can just evaluation both and they both better be true. Just like
> Java or C++ would allow you to do
>
> if(x > 3 && x >= 4)
>
> The behavior is defined, though the duplicate specification comes at slight
> performance penalty.
This is exactly where I was coming from: creating a datatype with no
legal values by enumerating only illegal values. According to Ashok
Malhotra in an answer to basically this same question, this is illegal
because it is conflict between facet values (similar to multiple
max(In|Ex)clusive statements).
I think that , , and sections make sense. There is no
other way to constrain a Mon-Friday type into a Mon-Thur type, although
conceivably Mon-Friday is an extension of Mon-Thur. But if Mon-Friday
is the datatype from the base schema which someone is basing a new
schema on, then being able to restrict it even further would definately
be useful.
> > > Also relating to float, are the characters case
> > > sensitive? Can I use
> > > "inf" as a value or does it need to be "INF"? Is
> > > "6.22e22" legal? Or
> > > does it need to be "6.22E22"?
>
> Formulation [34] would indicate that both 6.22e22 and 6.22E22 are legal.
> Formulations [31] and [32] would indicate that the only legal representation
> of infinity is INF and of not an number is NaN (which is inconsistent with
> section 3.2.4.1 which states NAN)
I missed the formulation section when writing that question (oops).
Thanks for pointing it out!
So which is correct, then, NaN or NAN? I'm guessing NaN.
> > > One last question: For the binary datatype, what is
> > > the default
> > > encoding?
> > >
>
> Someone should put a default in or make the encoding a required attribute.
I don't think that it can be made required:
is legal, and since type might be something other than binary, requiring
encoding would be useless. Since encoding would be specified doing
something like:
There really ought to be a default encoding so that simply declaring an
element of type binary is meaningful. I would suggest hex as the
default, since most binary data in XML is more than likely going to be
short and HEX is closer to being human-readable than Base64.
>
> Now for my question, what is the appropriate way to disallow NaN from a
> datatype without constraining the dataspace. I'd try the following, but
> maybe should be an explicit solution (or if this one is okay it should be
> added in the draft or some errata)
>
>
>
>
I don't really like the idea that specifying a range eliminates NaN
completely. As stated above, NaN may be desirable even in a constrained
range. I would suggest instead another facet which specifies whether or
not NaN can be included, or using the sections which
you suggested above.
- Dan Potter
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From Curt.Arnold at hyprotech.com Thu Jan 6 16:49:15 2000
From: Curt.Arnold at hyprotech.com (Arnold, Curt)
Date: Mon Jun 7 17:19:04 2004
Subject: PROPOSAL: type assignment based on tag name and presence/absense
of attributes
Message-ID: <00E567D938B9D311ACEC00A0C9B468730C7463@THOR>
Earlier version of XML Schema (http://www.w3.org/1999/05/06-xmlschema-1/) and many existing XML schemas use distinct tagnames for declaration and reference. The simplification initiative unified the
tag names but at the lost of a substantial degradation of the effectiveness of validation of schema documents. This proposal recaptures the validation effectiveness of distinct declaration and
reference elements by allowing element to type binding to be conditional on the presence or absense of an attribute.
For example:
Since these distinct tag names where associated with different types the content models of the attrGroup and attrGroupRef were different. You could put a attrDecl in an attrGroup but not in an
attrGroupRef.
The simplification initiative resulted in one tag name that could serve either as a reference or a declaration depending on whether the ref or name attribute was provided. However this prevents
either DTD or schema processors to detect logically invalid constructs like:
Proposal:
Enhancing the element with additional attributes "withAttribute" and "withoutAttribute" which is the name of an attribute that must (or must not) be present for the association of the tag
name to type be effective.
So for example, attribute would be reworked something like this
Effects:
This would allow a schema validator to more effective validate schema documents and other documents that use one tag name in different uses in the same context. The implementation and performance
cost should be negligable. Explicit definition of the key attributes allows the determination of the proper type to use with only looking at the start element.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tbray at textuality.com Thu Jan 6 17:08:29 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:04 2004
Subject: SAX2 Namespace Support
Message-ID: <3.0.32.20000106090848.0145e1e0@pop.intergate.ca>
At 10:37 AM 1/6/00 -0500, Hunter, David wrote:
>is it really an error to have the same namespace declared
>twice, with different prefixes? i.e., is the following really not legal
>
> xmlns:p2="urn:person:000-000-000">
> John
> Smith
>
That is legal. Who suggested otherwise? -Tim
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From dhunter at Mobility.com Thu Jan 6 17:30:56 2000
From: dhunter at Mobility.com (Hunter, David)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace question: Do attributes inherit the element's namespac
e?
Message-ID: <805C62F55FFAD1118D0800805FBB428D02BC0227@cc20exch2.mobility.com>
This question is coming up when I'm trying to explain how XSLT works, in the
context of namespaces.
Consider the following XSLT stylesheet:
Consider the match attribute of the element - is that
attribute in the XSLT namespace, or is it in no namespace? Same question
goes for the attributes on all of the other XSLT elements. From my
experimentation with a simple stylesheet which prints out the namespace of
every element/attribute, it looks like XT considers those attributes to be
in no namespace. My DOM implementation of choice also reports those
attributes as having no namespace URI.
So if that's true, why don't XSL processors care that the attributes they're
processing aren't in the XSLT namespace?
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From ldodds at ingenta.com Thu Jan 6 17:55:32 2000
From: ldodds at ingenta.com (Leigh Dodds)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace question: Do attributes inherit the element's namespace?
In-Reply-To: <805C62F55FFAD1118D0800805FBB428D02BC0227@cc20exch2.mobility.com>
Message-ID: <003801bf586f$32a12920$ab20268a@pc-lrd.bath.ac.uk>
> Consider the following XSLT stylesheet:
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
>
>
>
> Consider the match attribute of the element - is that
> attribute in the XSLT namespace, or is it in no namespace? Same question
> goes for the attributes on all of the other XSLT elements. From my
> experimentation with a simple stylesheet which prints out the namespace of
> every element/attribute, it looks like XT considers those attributes to be
> in no namespace. My DOM implementation of choice also reports those
> attributes as having no namespace URI.
>
> So if that's true, why don't XSL processors care that the
> attributes they're processing aren't in the XSLT namespace?
I'll have a crack at this. Lets see if I get shot down in flames.
Attributes don't have namespaces. And therefore your tools are correct.
Attributes live in the per-element-type partition.
See http://www.w3.org/TR/REC-xml-names/#ns-breakdown, and
http://www.w3.org/TR/REC-xml-names/#ns-expnames for some examples
of how Namespaces are applied to attributes.
The acceptions are 'global' attributes which live in a separate partition,
the global attribute partition, and these can have a Namespace.
I don't claim to fully understand this though - because as the [Namespace]
spec says XML doesn't support the declaration of global attributes.
Global attributes seem to be an application level construct creeping
into the lower layer. The can't be expressed in a schema/DTD, only within
the
prose of their documentation (e.g. something like "all HTML elements have
a CLASS attribute, which is processed thusly..."). I'd welcome any
input anyone has on this point.
Cheers,
L.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Thu Jan 6 18:57:34 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:19:04 2004
Subject: SAX2 Namespace Support
In-Reply-To: <805C62F55FFAD1118D0800805FBB428D02BC0224@cc20exch2.mobility.com>
References: <805C62F55FFAD1118D0800805FBB428D02BC0224@cc20exch2.mobility.com>
Message-ID: <14452.58720.951028.793372@localhost.localdomain>
Hunter, David writes:
> > > The problem though boils down to how often, in reality, XML
> > > instances will have the same Namespace declared twice, with
> > > different prefixes.
> >
> > The fact that the bug would be rare makes it worse -- an
> > application will run perfectly for, say, 18 months, then will
> > suddenly and inexplicably blow up long after the original
> > programmers have moved on because one input document happened to
> > declare the same NS twice and the programmers didn't build in
> > error recovery for that problem.
>
> I don't want to flog any dead horses, so I hope this hasn't been covered
> already, but is it really an error to have the same namespace declared
> twice, with different prefixes?
No, it's not an error at all. We're concerned about the borderline
case where there are two QName objects
{"http://www.w3c.org/1999/xhtml", "p", ""}
{"http://www.w3c.org/1999/xhtml", "p", "html"}
and a program compares them with equals() in Java or == in C++. Most
people are arguing that the two should be equals()/==, but a few
people have pointed out that that is a nasty trap for any programmer
who is not extremely familiar with the Namespaces spec.
My proposed solution is simply to punt: don't introduce a QName class
in SAX2, and leave such things to higher-level specs, which can
deal with these as they see fit.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bkline at rksystems.com Thu Jan 6 19:06:23 2000
From: bkline at rksystems.com (Bob Kline)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace prefixes optional?
Message-ID:
I'm still trying to absorb all of the intricacies of namespaces, and I
can see I have a long way to go. I'm looking at the XLink
recommendation (http://www.w3.org/TR/xlink/) and I see the following:
A sample set of declaration for a series of elements that use the
type attribute might look as follows:
. . . .
The following example shows how an XML document using these
declarations might look:
. . . .
Does this mean that once the namespace prefix has been declared in the
DTD the parsers understand that (for example) "href" really means
"xlink:href" (and therefore this sample document will be valid)?
--
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david at megginson.com Thu Jan 6 19:12:13 2000
From: david at megginson.com (David Megginson)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace question: Do attributes inherit the element's namespace?
In-Reply-To: Leigh Dodds's message of "Thu, 6 Jan 2000 17:55:20 -0000"
References: <003801bf586f$32a12920$ab20268a@pc-lrd.bath.ac.uk>
Message-ID:
Leigh Dodds writes:
> Attributes don't have namespaces. And therefore your tools are correct.
>
> Attributes live in the per-element-type partition.
>
> See http://www.w3.org/TR/REC-xml-names/#ns-breakdown, and
> http://www.w3.org/TR/REC-xml-names/#ns-expnames for some examples of
> how Namespaces are applied to attributes.
>
> The acceptions are 'global' attributes which live in a separate
> partition, the global attribute partition, and these can have a
> Namespace.
>
> I don't claim to fully understand this though
[snip]
You're not alone -- this point has caused as much confusion as any
other in the Namespaces spec.
Remember that Namespaces have to do simply with identification (this
is an A) and distinction (this is not a B); they don't say anything
about what A and B mean.
Basically, then, the main question was whether the attribute names in
the following two examples are identical:
and
For most applications (such as RDF, and, possibly, XSL), the answer is
a firm 'no', but the WG decided to make it *possible* to distinguish
the two in case anyone ever thinks of a good reason to do so.
All the best,
David
--
David Megginson david@megginson.com
http://www.megginson.com/
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From bosak at boethius.eng.sun.com Thu Jan 6 19:36:21 2000
From: bosak at boethius.eng.sun.com (Jon Bosak)
Date: Mon Jun 7 17:19:04 2004
Subject: OASIS work (was: Re: SAX2 Namespace Support)
Message-ID: <200001061936.LAA10568@boethius.eng.sun.com>
I can't really track this list, but I do try to take a core sample
from time to time, and I just noticed this reference to OASIS:
[David Megginson:]
| I think that it would be wrong to use fatalError to report
| Namespace violations, but others may disagree. I think that OASIS
| or some other body should take a stab at this problem -- we
| shouldn't wait for the W3C to solve everything.
Everyone should understand that OASIS is a grass-roots
from-the-ground-up organization. Anyone with $250/year can join
OASIS, and any group of OASIS members can apply to start an OASIS
technical committee as long as they follow the rules. But OASIS
isn't going to do this for you; you have to provide the
initiative. OASIS is a People's Standards Organization(sm), and
as in all such non-profit organizations, the People have to do the
work.
Anyone interested in forming an OASIS TC can contact me directly
for more information.
Jon
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tbray at textuality.com Thu Jan 6 19:38:51 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace prefixes optional?
Message-ID: <3.0.32.20000106113602.01416100@pop.intergate.ca>
At 02:07 PM 1/6/00 -0500, Bob Kline wrote:
>
> xlink:type (locator) #FIXED "locator"
> xlink:href CDATA #REQUIRED
> xlink:role NMTOKEN #FIXED "student"
> xlink:title CDATA #IMPLIED
> >
> . . . .
>
> The following example shows how an XML document using these
> declarations might look:
>
> href="/students/patjones.xml"
> title="Pat Jones" />
Looks like an error to me. I think that should be
Message-ID:
On 6 Jan 2000, David Megginson wrote:
> You're not alone -- this point has caused as much confusion as any
> other in the Namespaces spec.
>
> Remember that Namespaces have to do simply with identification (this
> is an A) and distinction (this is not a B); they don't say anything
> about what A and B mean.
>
> Basically, then, the main question was whether the attribute names in
> the following two examples are identical:
>
>
>
> and
>
>
>
> For most applications (such as RDF, and, possibly, XSL), the answer is
> a firm 'no', but the WG decided to make it *possible* to distinguish
> the two in case anyone ever thinks of a good reason to do so.
>
I'm feeling a little lost in the medieval subtleties here. Can you
explain what the meaning of "distinguish" is in this context? What's
the difference between saying "these two examples are not identical" and
"we can distinguish between these two examples"?
--
Bob Kline
mailto:bkline@rksystems.com
http://www.rksystems.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From tbray at textuality.com Thu Jan 6 20:13:16 2000
From: tbray at textuality.com (Tim Bray)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace question: Do attributes inherit the element's
namespace?
Message-ID: <3.0.32.20000106121424.0140e2a0@pop.intergate.ca>
At 02:51 PM 1/6/00 -0500, Bob Kline wrote:
>> Basically, then, the main question was whether the attribute names in
>> the following two examples are identical:
>>
>>
>> For most applications (such as RDF, and, possibly, XSL), the answer is
>> a firm 'no', but the WG decided to make it *possible* to distinguish
>I'm feeling a little lost in the medieval subtleties here.
It's a pity this stuff is so hard, but well... it's hard. One of the
brightest computer programmers I ever knew, Phil Karlton, said "There
are only two hard problems in Computer Science: cache invalidation
and naming things." I agree that it's hard to avoid discussions that
are reminiscent of medieval theology.
So... let's try again. Consider these two
The namespace spec could have said one of three things:
1. These must always be treated as identical
2. These must always be treated as different
3. Applications can make up their minds
The then-Working Group eventually went for #3. It's kind of like
non-Euclidean geometries; each of the three options above produces a
self-consistent universe, so the only question is, which one do we
want to live in?
Most applications, it seems, want to live in Universe #1, and the
namespace spec allows them to do that. -Tim
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
From david-b at pacbell.net Thu Jan 6 20:25:58 2000
From: david-b at pacbell.net (David Brownell)
Date: Mon Jun 7 17:19:04 2004
Subject: Namespace question: Do attributes inherit the element's namespace?
References: <003801bf586f$32a12920$ab20268a@pc-lrd.bath.ac.uk>
Message-ID: <3874FA42.8A6C7369@pacbell.net>
Leigh Dodds wrote:
>
> >
> > ...
> >
> > Consider the match attribute of the