[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: painting types

  • From: Jonathan Borden <jborden@m...>
  • To: "Bullard, Claude L (Len)" <clbullar@i...>,"Simon St.Laurent" <simonstl@s...>, xml-dev@l...
  • Date: Tue, 06 Mar 2001 19:26:17 -0500

types of abstract painting
>
> >3) In XML Schema the type of an element may similarly be
> inferred from its
> >name (modulo context dependencies).
>
> That gets dicey.  Type is an overloaded term in XML Schema.  Integer is a
> type too.  An abstract type is assignable.  Type just diverged
> *meaningfully*.

perhaps but this isn't as ominous as it appears. XML Schema provides for
types defined by a pattern, a regexp, so what has been the voodoo of a
'unsignedShortInt' that otherwise XML irrelevent non-text artifact of 16 bit
architectures -- can also be viewed as simply a character string that
matches a particular pattern. To turn this argument around, view an XML 1.0
Name as simply the simplest pattern -- it matches a literal string. Abstract
types are types that are assigned to types - sure its an extension but when
viewed as a regular expression, we are still in the text world we know and
love.


>
> >I can't say for sure what XPath 2.0 will look like, but if I
> were doing it
> I
> >would create a function 'type()' which returns the qname of the
> type of the
> >element in question the xpath:
>
> >"//*[type()='xsd:unsignedIt']
>
> >would simply select all the elements with type=xsd:unsignedInt.
>
> Ok.  Does that handle problems such as 'abstract types' or are these
> just an overloading of the term and do not make infoSet contributions?

testing for equality is the simplest, but posit a function "derivesFrom" as
in

"//*[derivesFrom(type(),xsd:unsignedInt)]"
>
> I'm looking for the "complexity" that worries people.  You seem to be
> saying a function that returns the infoSet contributions (sort of the
> sonOfIUnknown) is sufficient.
>
Another way would be to expose the infoset items as if something like an
"xsd:type" attribute were added to an element i.e.:

	//*[@xsd:type='xsd:unsignedInt']

(the point being that all XPath implementations I know of already operate on
the parsed 'Infoset' whether you call that a series of SAX events, a DOM or
a JDOM).

I suppose they will create a new axis or something but the point is that I
can see a use for this that would be simple -- of course whether that's what
we will get remains a question.

-Jonathan


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.