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

Re: The limits of XML mean the limits of my data world

  • From: Dimitre Novatchev <dnovatchev@gmail.com>
  • To: "Liam R. E. Quin" <liam@fromoldbooks.org>
  • Date: Sun, 29 May 2022 19:49:34 -0700

Re:  The limits of XML mean the limits of my data world
> > Therefore, continuously running data that may have no start and/or
>   > end
>   > doesn't seem to fit this definition, as at any moment of time we
>   > don't have
>   > "the whole data", thus we are not able to say whether or not this is
>   > a
>   > well-formed document.

>   That's true, but again, there's no prohibition against acting on a
>   partial document, only on saying the document as a whole is well-formed
>   XML.

>   >
>   > I think there are mechanisms in at least some programming languages
>   > of
>   > monitoring data streams, recognizing data patterns and their
>   > repetitions,
>   > recognizing "events" in the running data and perceiving it as a
>   > stream of
>   > events.
>   >
>   > Can anyone suggest how to represent this in XML?

>   Usually you have a set of pattern/action pairs. This is for example how
>   XSLT 3 works in streaming mode: whenever a pattern is matched (a
>   template match pattern in a mode with streaming="yes") the
>   corresponding template body is used to construct a result sequence.

There is no disagreement here about what can be done using XSLT.

But the question is not about this! The question is what can be expressed with XML.

When the input is streaming and it "looks like XML" it is still not XML and it can turn out at any moment that the input is not XML.

Not only this, but when such an error is encountered, there is the problem of rolling back the whole processing that has been done up until that moment.

If we decide not to roll-back the processing, then we recognize the fact that the input wasn't really XML and that we don't care...

And the knowledge that not everything has to be expressed as XML but it still can be processed, looks perfectly acceptable (and inevitable) to me. This is the only wise and realistic decision.

Thanks,
Dimitre

On Sun, May 29, 2022 at 4:32 PM Liam R. E. Quin <liam@fromoldbooks.org> wrote:
On Sun, 2022-05-29 at 09:01 -0700, Dimitre Novatchev wrote:
> > Would you provide an example of something that cannot be expressed
> > in XML
> but can be expressed in some other data language, please?
>
> The whole notion of a "well-formed XML document" implies that this
> needs to
> be present as a whole in memory (RAM or other type).

I'd dispute that.  The XML spec allows a parser to return parse events
before the end of the document so long as it clearly signals an error
if it finds one, and does not then continue to claim the input is XML.
There are streaming parsers, e.g. using the SAX API.

> Therefore, continuously running data that may have no start and/or
> end
> doesn't seem to fit this definition, as at any moment of time we
> don't have
> "the whole data", thus we are not able to say whether or not this is
> a
> well-formed document.

That's true, but again, there's no prohibition against acting on a
partial document, only on saying the document as a whole is well-formed
XML.

>
> I think there are mechanisms in at least some programming languages
> of
> monitoring data streams, recognizing data patterns and their
> repetitions,
> recognizing "events" in the running data and perceiving it as a
> stream of
> events.
>
> Can anyone suggest how to represent this in XML?

Usually you have a set of pattern/action pairs. This is for example how
XSLT 3 works in streaming mode: whenever a pattern is matched (a
template match pattern in a mode with streaming="yes") the
corresponding template body is used to construct a result sequence.

liam

--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org


--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.
 


[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.