OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] typing and markup (was Re: [xml-dev] XQuery types)

[ Lists Home | Date Index | Thread Index ]

On Mon, 2002-05-06 at 15:49, Jonathan Robie wrote:
the philosophy behind first-class dynamic typing without ambiguity.
> >
> >This discussion's gotten me thinking once again about whether XML is
> >appropriate to the tasks for which it is being sold. There was a long
> >discussion about types here a few years ago in which someone suggested
> >that the types provided by DTDs were in fact far too rich, and that
> >perhaps CDATA/ID/IDREF was already more than enough.  Then we get into
> >W3C XML Schema types, which I consider far too overgrown, and now XQuery
> >is in the type mire.
> 
> Frankly, I think much of this is because of the level of the discussion.

No, I don't think so.  

> Suppose you try to multiply an integer times a URI. Do you want that error 
> to be caught? Suppose you want a sorted list of numbers - do you want to 
> sort them numerically rather than lexically? If so, types are good. Yes, 
> whoever implemented the system had to think to make that happen. We have 
> descriptions of the thinking implementors will have to do.
> 
> Has the strong static typing of Java gotten in your way as a programmer?

No, it doesn't, but you're asking completely the wrong question.  The
successful presence of strong static typing in Java in no way suggests
that such things are appropriate in XML.  The kinds of typing we're
seeing proposed and discussed in fields like Schema and Query are kinds
of typing which seem perfectly acceptable in Java but downright
ridiculous in markup.

If - in an XML context - you're trying to multiply an integer times a
URI, I think you've likely run amok in your processing.  You probably
shouldn't be attempting to multiple @href by quantity in the first
place, and static typing's not going to help there.  It may be able to
help you with sort order, but I'd rather see a mechanism for sorting,
not a type system which happens to understand sorting.

 
-- 
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS