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

Re: Updating XML


bi sax

> Well, PaulT was certainly right on when he said it could be more terse.  
> Of course, there are some areas where the facile approach to terseness 
> would just cause more bloat:
> 
> <xupdate:update select="/foo/bar">
>   <malatesta fn="sigismundo">
>     <manfredi fn="manfredo">
>       <gonzaga/>
>     </manfredi>
>   </malatesta>
> </xupdate:update>
> 
> is much better IMHO to
> 
> remove(/foo/bar)
> append-element(/foo, "bar")
> append-element(/foo/bar, "malatesta")
> set-attribute(/foo/bar/malatesta, "fn", "sigismundo")
> append-element(/foo/bar/malatesta, "manfredi")
> set-attribute(/foo/bar/malatesta/manfredi, "fn", "manfredo")
> append-element(/foo/bar/malatesta/manfredi, "gonzaga")

I agree that sequence of brutal setters is not a 
universal solutuion, but there could be another 
approach to bi-directional XPath, still based 
on /foo/bar/#value = 'value'. Apply the 
way of thinking that XPath has taken, just
apply it for 'writing'.
 
> Of course perhaps this is a straw man.  Paul, what else have you got in 
> your sleeve?

I can provide a terse XPath-alike dialect that would 
cover this testcase ... and many others testcases...  
and you can do the same, just put the concepts of 
current XPath on steroids ... Also, I can provide 
improved version of XPath that would be 
bi-direcional by design ( current XPath has 
not been designed for updates, because 
it was a part of XSL and XSL was not for 
updates e t.c. e t.c. )

I was wondering if somebody already did that. 

We have plenty of people, who are selling XML 
tools. Big companies. Significant R&D budgets.
Standards and Standards. 

I was wondering, maybe there is a terse and consistent 
language for quering / updating XML.

Rgds.Paul.



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.