xsl-list
[Top] [All Lists]

Re: [xsl] Modeling matrices in an XML environment

2020-07-16 17:13:03
I did have some success doing number crunching with xml in the mix...
I was using an in-memory representation and tracking where all the
numbers I was manipulating were to perform the actual numerical
calculations in C++.  When certain events occurred, xslt was invoked
on the current state of the in-memory DOM, which would evaluate and
determine future trip/trap-points for the simulation.
Not optimal design...

On Thu, Jul 16, 2020 at 2:27 PM Liam R. E. Quin liam(_at_)fromoldbooks(_dot_)org
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

On Thu, 2020-07-16 at 10:28 +0000, Dr. Roger L Costello
costello(_at_)mitre(_dot_)org wrote:
Liam wrote this really interesting paragraph:

The benefit to using maps or arrays over
elements in XSLT or XQuery is that element
nodes are too heavyweight, and too prone
to turning their content back into strings.
In XQuery in particular, constructors by
default do a terrible and dismal thing:
<x>3</x> makes a text node inside an x
element. And XDM element nodes have
a ton of properties, such as next, previous,
parent, schema type, is_happy, none  of
which are needed for a matrix of numbers.

Yikes! Isn't that an argument against using XML and XSLT?

No - but use the best tool for the job at hand.


/Roger


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

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>