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

Re: hackable xml

  • From: David <dlee@calldei.com>
  • To: xml-dev@lists.xml.org
  • Date: Mon, 26 Jul 2010 14:36:21 -0400

Re:  hackable xml
This is essentially the core of what xmlsh does, except its based on 
XQuery not XSLT.
But it has lots o' bitty tools you can efficiently script together to 
work with xml.
Its also what XProc does although XProc does so in  XML Syntax.
So there are already such tools out there ...


-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org


On 7/26/2010 2:31 PM, Pete Cordell wrote:
>> So if you had:
>>
>> <ns1:config xmlns:ns1="http://somecomp.com">
>> <ns1:foo>abc</ns1:foo>
>> </ns1:config>
>>
>> xgetnsprefix "http://somecomp.com" ns < in.xml | xchgeval $ns:foo 
>> newValue >
>> out.xml
>
> It's just occurred to me that there's no reason such shell scripts 
> couldn't be implemented using XSLT.
>
> The user gets the power of XSLT without the learning curve.
>
> Pete Cordell
> Codalogic Ltd
> Interface XML to C++ the easy way using XML C++
> data binding to convert XSD schemas to C++ classes.
> Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
> for more info
>
> ----- Original Message ----- From: "Pete Cordell" 
> <petexmldev@codalogic.com>
> To: "Andrew Welch" <andrew.j.welch@gmail.com>; "Richard Salz" 
> <rsalz@us.ibm.com>
> Cc: "xml-dev" <xml-dev@lists.xml.org>
> Sent: Monday, July 26, 2010 6:49 PM
> Subject: Re:  hackable xml
>
>
>>
>> Is there a list of types of operation such a community would like to do?
>> The below example hints that you might be able to come up with a set of
>> simple shell scripts (maybe implemented in perl/python/etc) that you 
>> could
>> pipe together, perhaps storing intermediate variables in the 
>> environment.
>>
>> So if you had:
>>
>> <ns1:config xmlns:ns1="http://somecomp.com">
>> <ns1:foo>abc</ns1:foo>
>> </ns1:config>
>>
>> xgetnsprefix "http://somecomp.com" ns < in.xml | xchgeval $ns:foo 
>> newValue >
>> out.xml
>>
>> where  xgetnsprefix extracts the namespace prefix associated with 
>> "http://somecomp.com" and stores it in the shell variable ns and 
>> xchgeval changes the value of the specified element.
>>
>> No prizes for efficiency, but it depends whether human performance or 
>> computer performance is more important to you.
>>
>> Pete Cordell
>> Codalogic Ltd
>> Interface XML to C++ the easy way using XML C++
>> data binding to convert XSD schemas to C++ classes.
>> Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
>> for more info
>> ----- Original Message ----- From: "Andrew Welch" 
>> <andrew.j.welch@gmail.com>
>> To: "Richard Salz" <rsalz@us.ibm.com>
>> Cc: "xml-dev" <xml-dev@lists.xml.org>
>> Sent: Monday, July 26, 2010 4:21 PM
>> Subject: Re:  hackable xml
>>
>>
>>
>> On 26 July 2010 13:53, Richard Salz <rsalz@us.ibm.com> wrote:
>>> I don't get it -- which community needs this xml-like thing? And why?
>>
>> The community that just wants to read or write very simple xml files.
>>
>> Given:
>>
>> <config xmlns="http://somecomp.com">
>> <foo>abc</foo>
>> </config>
>>
>> ...and you want to update the value of <foo>, how would you do it?
>>
>> Or put more realisticly, a colleague of yours knows very little about
>> XML and all of its related technologies, and asks you how they should
>> do it.
>>
>> - XSLT transform
>> - XQuery update
>> - JDOM, XOM etc
>> - SAX parse and generate the events
>> - some data-binding tool (if an xsd exists)
>>
>> All fairly straight forward for the xml community, but to anyone else
>> each of those seem like a massive overkill for such a seemingly simple
>> task.  Perhaps there is a simple way that I've missed?
>>
>> The ultimate goal of hackable xml is to make it possible to just do a
>> string replace of "<foo>abc</foo>" with "<foo>newValue</foo>" (which
>> is often what happens anyway, causing many hours of fun) and then
>> serialize/reparse without any issues.
>>
>>
>>
>> -- 
>> Andrew Welch
>> http://andrewjwelch.com
>> Kernow: http://kernowforsaxon.sf.net/
>>
>> _______________________________________________________________________
>>
>> 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
>>
>>
>>
>>
>>
>> _______________________________________________________________________
>>
>> 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
>>
>>
>
>
>
>
> _______________________________________________________________________
>
> 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.