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

Re: Converting a variety of data formats, containingvarious ki

  • From: Rick Jelliffe <rjelliffe@allette.com.au>
  • To: Dave Pawson <dave.pawson@gmail.com>
  • Date: Thu, 6 Oct 2016 04:08:16 +1100

Re:  Converting a variety of data formats

Virtual Axes: I guess the idea would be for every axis to have a virtual equivalent, with the same type signature. So a vattribute could only return attribute nodes, and so on. Then any function of say one argument (".") declared with a compatible type could be used as the virtual axis name.

So it could be implemented by text substution of the ex path (macro), as well as by tree operations.

Regards
Rick


On 05/10/2016 7:51 PM, "Dave Pawson" <dave.pawson@gmail.com> wrote:
I'd like to see more of this Mike.. perhaps a worked
example based on your event ideas?
  An option to template match.. or something else?

regards

On 5 October 2016 at 09:14, Michael Kay <mike@saxonica.com> wrote:
>
> Mainstream XML technology definitely disfavours generic approaches: to move
> to generic approaches where the specific semantics is in attributes *and*
> retaining validation requires moving to RELAX NG or Schematron in which
> attributes are first-class citizens (rather than dtds or xsd where all
> patterns/types are keyed by element context only.)
>
>
> I've never really understood why we consider
>
> <graduation date="2012-03-31"/>
>
> as less generic than
>
> <event type="graduation" date="2012-03-21"/>
>
> There seems to be some very deep-rooted feeling that element and attribute
> names are "fixed" while attribute values are "variable". Perhaps our schema
> technology encourages this thinking, or perhaps it is languages like XPath,
> but the fact is that we don't really believe and trust in the "X" in "XML".
>
> Even Xpath's syntax disfavours generic approaches (by providing no support),
> no crIticism implied. I have been working with generic schemas for much of
> the last decade, and I really think XSL T Xpath would be enhanced by
> providing some simple macro system to uncomplicate paths: for example  so
> that instead of writing
>
>     event[property[@name="kind"][@value="birthday"]]
>
> i could declare a virtual child named birthday-event with that xpath, and
> then use a virtual axis:
>
>   vchild::birthday-event
>
>
> I've argued in favour of user-defined axes for many years but I've found it
> hard to get the idea taken seriously. Though I've never taken it quite this
> far as to allow the "node-test" part of the step to be interpreted in a
> user-defined way.
>
> Substitution groups can be great for handling this kind of content: where in
> schema-aware XPath, schema-element(event) selects graduation elements
> because they are part of the substitution group. I've seen little take-up of
> that, however.
>
> Michael Kay
> Saxonica
>



--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.