[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Streaming Transformations for XML
Hi, As far as I know the streaming principle is nowhere more elaborated then in the OmniMark programming language. Combined with their powerful pattern matching you can solve XML programming problems very neatly. (fast, robust and memory inexpensive) They don't use XML syntax but once you understand the streaming principle (this is really very important) the syntax is easy to learn and the learning curve is not too high. You can find more information on their website http://www.omnimark.com and you can always contact their sales people. They are very willing to answer all your questions. Btw, I'm not an OmniMark employee but a convinced user. Best regards, Gert -----Original Message----- From: Petr Cimprich [mailto:petr@g...] Sent: woensdag 13 februari 2002 14:43 To: xml-dev@l... Subject: Streaming Transformations for XML I'm playing with an idea of a streaming transformation language. I don't mean things like forward-only streamable subsets of XSLT or building subtrees on request only, but an alternative language designed for streaming transformations. From a bit different point of view, it would be a language to define SAX filters. Such a hypothetic languge (let me call it STX) could use an XML, XSLT-like syntax with templates. However, the meaning of templates would be quite different from this of XSLT. Matching expressions could consists of SAX-related axes and simple, XPath-like identifier, for example. STX transformations will be, of course, much less powerful than XSLT; it will be as powerful as a SAX filter can be. On the other hand, the new language could provide an memory inexpensive way to handle simplier transformation. Instead of a BNF definition, I append an example processed by non-existing STX processor. It should provide you with some very basic feeling about a possible syntax and semantics of the language. I wonder whether the benefits of having simple streaming transformations worth to learn a new language (and to implement a processor). Also, I haven't been able to find a similar solution or idea on the Net, but I expect there must a similar effort in the huge XML community. So, any pointers are welcome to prevent me from reinventing the wheel. Regards, Petr -------------- * Example ** Transformation: <stx:transform xmlns:stx="some_namespace_here"> <stx:variable name="date" select="'Monday'"/> <stx:template match="element-start::list"> <stx:copy-of attributes="all"> <stx:attribute name="date" select="$date"/> </stx:copy-of> </stx:template> <stx:template match="element-end::list"> <stx:copy-of/> </stx:template> <stx:template match="element-start::item"> <stx:copy-of/> <id><stx:value-of select="@id"/></id> <stx:if test="@id=2"> <note>the item we have been looking for</note> </stx:if> </stx:template> <stx:template match="element-end::item"> <date><stx:value-of select="$date"/></date> <stx:copy-of/> </stx:template> <stx:template match="character::*"> <text><stx:copy-of/></text> </stx:template> </stx:transform> ** Input data: <list id="19"> <item id="1">A</item> <item id="2">B</item> <item id="3">C</item> </list> ** Output: <list id="19" date="Monday"> <item> <id>1</id> <text>A</text> <date>Monday</date> </item> <item> <id>2</id> <note>the item we have been looking for</note> <text>B</text> <date>Monday</date> </item> <item> <id>3</id> <text>C</text> <date>Monday</date> </item> </list> -- Petr Cimprich Ginger Alliance www.gingerall.com ----------------------------------------------------------------- The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|