XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Converting schema to schematron

Hi Mike,

> Once you have this basic support at the data structure level, you probably need to introduce operations that take advantage of it: rather like map:put which creates a new map as a modified copy of an existing map, with a delta implementation underneath, you need operations that create a new tree which is a delta copy of an existing tree differing only in small details, e.g. a change in the value of a single attribute.

Syntactically, this would be very similar to a copy-modify-return with an update expression. This functionality is actually supported by JSONiq with a syntax similar to the Update Facility -- but on JSON trees (where there are no parent pointers in the JDM design).

With Zorba 3.0:
__
jsoniq version "1.0";

let $a := {
  "foo" : 1,
  "bar" : [
    { "foobar" : 2 },
    { "foobar" : 5 }
  ]
}
return
 copy $b := $a
 modify replace value of json $b.bar[[1]].foobar with 3
 return $b
__

Kind regards,
Ghislain



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


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS