XML document formats?
[1/15] from: petr::krenzelok::trz::cz at: 22-Mar-2006 12:07
Hi,
just trying to find out, if anyone works in the industry, where you use
some standard XML document formats as invoices, orders, etc.? XML may
get pretty complex, and maybe I could use some templates for that
purpose? Does anyone have any pointers? I will try to look at OASIS
consortium, but not sure I will find something :-)
thanks :-)
-pekr-
[2/15] from: carlos:lorenz::gmail at: 22-Mar-2006 8:17
Petr,
Talking about XML, how do you use REBOL to parse XML docs? I have tried once
but found that too much complicated. By the way blocks are much easier to
use than XML nodes
2006/3/22, Petr Krenzelok <petr.krenzelok-trz.cz>:
> Hi,
> just trying to find out, if anyone works in the industry, where you use
<<quoted lines omitted: 7>>
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
--
*:-.,_,.-:*'``'*:-.,_,.-:
Carlos Lorenz
*:-.,_,.-:*'``'*:-.,_,.-:
[3/15] from: rasmussen:bryan:gmai:l at: 22-Mar-2006 12:27
Hi,
I'm on the Danish implementation of UBL - working on the current UBL
2.0 implementation.
On 3/22/06, Petr Krenzelok <petr.krenzelok-trz.cz> wrote:
[4/15] from: yeksoon:neusteps at: 22-Mar-2006 19:31
Petr Krenzelok wrote:
> Hi,
> just trying to find out, if anyone works in the industry, where you use
<<quoted lines omitted: 4>>
> thanks :-)
> -pekr-
Have you tried xml.org ?
There are DTDs there. Just do a search.
YekSoon
[5/15] from: petr:krenzelok:trz:cz at: 22-Mar-2006 12:37
Carlos Lorenz wrote:
> Petr,
>
> Talking about XML, how do you use REBOL to parse XML docs? I have tried once
> but found that too much complicated. By the way blocks are much easier to
> use than XML nodes
>
Well, my request was not rebol related, sorry :-) I just tried to use
experience of great rebol ml audience, as each of us, work for some kind
of company, bigger or smaller. If it was upon me, I would use text
files, as in EDI, with defined format. But you know - those big boys sw
do believe in XML easy of exchangability :-) So we mainly have to use
XML here.
But to be constructive, there was/is Gavin Mckenzie's XML-parse and
XML-object or other stuff on ML. At some point, there was rather
extensive discussion on this topic on AltME. One group wanted SAX-like
functionality, other one wanted DOM-based aproach .... no particular
project started though ...
-pekr-
[6/15] from: petr:krenzelok:trz:cz at: 22-Mar-2006 12:50
bryan rasmussen wrote:
> Hi,
> I'm on the Danish implementation of UBL - working on the current UBL
> 2.0 implementation.
>
Hi,
thanks a lot for the pointer! I found some fine article about UBL
(Universal Business Language). I will look also into ebXML. Btw - do you
find UBL as a powerfull standard? What were your motives to choose this
one in particular?
PS: do you use rebol in any realation to XML? just curious :-)
thanks,
Petr
[7/15] from: rasmussen:bryan::gmail at: 22-Mar-2006 12:57
Rebol's XML support is pretty bad. Gavin's implementation is not
really adequate considering that most people used to working with XML
are used to dealing with a stack of technologies, none of which are
implemented. Aside from that I seem to recall that it did not have a
good implementation for Namespaces, and I don't recall but I seriously
doubt there was any focus on some of the more ersatz bits of the spec
like Attribute-Value Normalization
http://www.w3.org/TR/2004/REC-xml-20040204/#AVNormalize
I would suggest the following:
Rebol ships with support for the libxml project http://xmlsoft.org/
also libxslt http://xmlsoft.org/XSLT.html to make things complete. It
has been my experience that these libraries are maintained to be
cross-platform.
Rebol still should contain the old rebol parsing of xml as a fallback,
that is to say when XML is not well-formed the XML can still be
accessed and manipulated as Rebol blocks. This will help in the
building of applications where the XML is not data critical and not
well formed documents can be fixed, or in building applications that
do this kind of fixing.
On 3/22/06, Petr Krenzelok <petr.krenzelok-trz.cz> wrote:
[8/15] from: rasmussen:bryan:gmai:l at: 22-Mar-2006 13:05
No I don't use Rebol in relation to XML (for the reasons outlined
below), I don't really use the language any more but keep an eye on
the list in case it gets support for things I want in which case I
would be taking it back up of course (mostly Rebol for me fit in the
position of a good network administration language, since I work
mostly in standardization nowadays, and standardization of XML
languages specifically there's not that much I have to use it for -
this is not to take away from what others use it for of course).
Well I work for the government organization that does the
specification of the Danish implementation of UBL, basically decisions
to use it have been political as most decisions of government
standards must be - how much does one think the standard will improve,
move forward etc. etc.
As for the power of UBL, I would say that UBL 2.0 will be powerful
enough to represent most things that most people want to do with ERP
systems. Invoicing, Orders, Response Documents, Credit notes, etc.
etc.
Also, politically speaking there is some indication that it will be
the business document standard in Scandinavia, Great Britain. Lots of
Asian support, European support, etc.
If I were you I would look at the Small Business Subset of UBL
specifically, don't let the name fool you, it's not just for Small
Businesses.
Cheers,
Bryan Rasmussen
On 3/22/06, Petr Krenzelok <petr.krenzelok-trz.cz> wrote:
[9/15] from: petr:krenzelok:trz:cz at: 22-Mar-2006 15:38
bryan rasmussen wrote:
> Rebol's XML support is pretty bad. Gavin's implementation is not
> really adequate considering that most people used to working with XML
<<quoted lines omitted: 4>>
> like Attribute-Value Normalization
> http://www.w3.org/TR/2004/REC-xml-20040204/#AVNormalize
Yes, rebol's XML support is bad. Well, it is not bad, but apparently
nonexistant, as we can't talk about support in the sense of implementing
standard conformant parser ....
> I would suggest the following:
>
> Rebol ships with support for the libxml project http://xmlsoft.org/
> also libxslt http://xmlsoft.org/XSLT.html to make things complete. It
> has been my experience that these libraries are maintained to be
> cross-platform.
>
I just had very brief look into it. Man, all those XML related things
look so complex :-( Some time ago, we held discussion on XML on Altme
XML channel. There was few usefull links also, we discussed if we should
go SAX or DOM way or choose some mixture. If you have a few spare
minutes to read it briefly, you can do so here, maybe you have good
experience to give us some comments/suggestions:
http://www.rebol.net/altweb/rebol3/chat323.html
beware - read from the bottom :-)
thanks a lot,
-pekr-
[10/15] from: kgozlinski:neokartgis:pl at: 22-Mar-2006 15:45
I wish that libxml and libxslt should be included into rebol to create
native xml datatype.
Wonder if XPath can be expressed in path! datatype
but rebol does not have even unicode, so it is long way
before it will be possible communicate with world outside rebol.
Does anyone know if plugin framework for Rebol 3.0
will allow adding new datatypes to rebol?
Karol
[11/15] from: petr:krenzelok:trz:cz at: 22-Mar-2006 15:59
Karol Gozlinski wrote:
> I wish that libxml and libxslt should be included into rebol to create
> native xml datatype.
<<quoted lines omitted: 3>>
> Does anyone know if plugin framework for Rebol 3.0
> will allow adding new datatypes to rebol?
I hope so. We were told soon enough (in days) we will see a roadmap. So
let's wait a bit for it, hopefully rebol 3 does implement that. Then I
hope we have enough of space to voice our wishes to RT ...
-pekr-
[12/15] from: petr:krenzelok:trz:cz at: 22-Mar-2006 16:02
bryan rasmussen wrote:
> Rebol's XML support is pretty bad. Gavin's implementation is not
> really adequate considering that most people used to working with XML
<<quoted lines omitted: 9>>
> has been my experience that these libraries are maintained to be
> cross-platform.
btw - what about Xerces? It was even suggested by XOM author -
interesting article here -
http://www.artima.com/intv/xomdesign.html
-pekr-
[13/15] from: rasmussen:bryan:gmai:l at: 22-Mar-2006 22:32
Xerces is another possibility, but I'm not as familiar with the Xerces
C as I am with the Xerces Java, furthermore Xerces just gives you a
parser, the Libxml project gives parser, schema languages support, XML
Schema and Relax-NG etc. etc.
As you noted before it seems complex, quite a bit of it is complex,
and I believe needlessly so, some of it is set for a shaking out. I
wonder somewhat if XML Schema will make it.
But in the meantime XML Schema is necessary for anybody forced to deal
with the horrors of SOAP, WS-I etc.
Rebol is too far behind to hit any of these targets with the next
release, but if a good library was included then there is enough code
out there that could theoretically be leveraged to hit other targets.
I mean even if Rebol came with a compliant XML parser at this point,
that's too late. But if it came with Libxml and the non-compliant
parse-xml as a fallback that's a big plus for certain developers.
It would actually be a useful tool for me as an XML guy, and I can say
that I am pretty skilled in various XML related technologies.
someone asked about XPath being expressible as Path, do you mean would
an XPath if queried for datatype return path?
probably for simple ones, but here are some complex ones:
/*[local-name()='document']
Return the document element (the first element encountered in the
tree, the root element but technically not the root node, since the
root node holds the document element as well)
if the name of this element without namespace prefix is equal to document
//p[-class]/a/-href
return all attributes href on all a elements that are children of p
elements that have an attribute class.
I don't think these would return type path is queried in Rebol.
Again I'd reiterate, the Libxml project implements not just many
complex things, but many of the really useful technologies for working
with XML, among which would be xpath, and relax-ng, a simpler than W3C
XML Schema schema language.
On 3/22/06, Petr Krenzelok <petr.krenzelok-trz.cz> wrote:
[14/15] from: rasmussen:bryan:gma:il at: 22-Mar-2006 22:54
basically the difference is as expressed in the thread, what do you
want to do, SAX is a streaming api therefore used for manipulating
large documents, especially if you only want to extract data, the Dom
reads the whole tree into memory. Thus there can be performance
differences between these two.
However there is another difference, that being that a lot of
developers find SAX counter intuitive, and Dom not so counter
intuitive.
There's a saying somewhere: "SAX is too hard, Dom is too weak."
However they are just two different API's, not the only ones out
there. Rebol could have its own, if it had a XML and Namespaces
conformant parser(everyone is namespace conformant nowadays)
Xpath can be considered another API for getting at data in an XML
document. Most DOM implementations allows you to to basically pass
XPaths to get back a portion of the document that you then work with
as shown in this article from Microsoft:
http://msdn.microsoft.com/msdnmag/issues/0900/xml/
I personally think XPath support is more essential than either of the
other two, for example in .Net one makes a lot of use of XmlReaders,
thus it can be shown that if someone has a better way it can work, but
it must also be conformant (of course being from MS does not hurt):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconReadingXMLWithXmlReader.asp
A propos my suggestion for Libxml, then I would hope it would be
possible to port libgdom http://gdome2.cs.unibo.it/ and thus have a
dom implementation
of course it should be noted that Libxml has partial implementations
of both SAX and DOM in the core library, but these are not supposed to
100% conformant.
Aside from all this, of the two DOM has higher mindshare, and it is a
W3C specification.
In the context of how a Rebol-ish XML api might work one could look at
SXML, a scheme project http://okmij.org/ftp/Scheme/xml.html
On 3/22/06, Petr Krenzelok <petr.krenzelok-trz.cz> wrote:
[15/15] from: rasmussen:bryan:g:mail at: 22-Mar-2006 23:02
It should be noted that the libxml xml schema implementation is not
very conformant, but one of the dirty facts of xml schema is there
isn't a great deal of conformance in the implementations.
On 3/22/06, bryan rasmussen <rasmussen.bryan-gmail.com> wrote:
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted