Re: Is it possible to print enum's text?



James Kanze <james.kanze@xxxxxxxxx> writes:
On Nov 28, 11:41 am, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:
Ian Collins <ian-n...@xxxxxxxxxxx> writes:

[...]

XML has a couple of advantages over ASN.1, it's trivial to
parse and

XML trivial? You must be trolling.

Compared to parsing ASN.1, it is.

Nevertheless, ASN.1 uses exactly the same rationale for its
weird data description language: Why do you worry about
something which can be dealt with by existing software? In
this particular case, the existing software will produce a
technically better result, because the binary encoding
produced in this way has massively less noise in it than a
XML-steganogram.

One advantage of XML is that the existing tools permit not only
generating the desired code, but also generating both
documentation and code from a single source.

Combining two different texts inside one file by means of using a
suitable markup language isn't exactly a new and original
feature. Perl has had that as pod for ages. Doxygen provides similar
features for a lot of other languages. Speaking for myself, I don't
want these types of mixups. Especially as practical experience
suggests that people will refrain from modifying any text not germane
to the problem they are trying to solve, vulgo, that these globs of
'documentation', which are already an useless distraction on their
own, will additionally be wrong. And the only actual use of (a subset of)
ASN.1 I had to deal with in more detail so far, SNMP MIBs, have always
used inline documentation.

Which makes a nice XML-counterargument: Since the W3C
generously ignored existing technology in order to recreate a
similarly capable one from scratch for some purpose, the fact
that XML exists can obviously not justify its use on its own
(the other assumption would be that the responsible people
where rather stupid and basically interested in 'turf
management' ...).

Well, they did base it on the existing technology (SGML), which
wasn't that wide spread.

They actually based it on another existing technology, namely, ASCII
encoding of letters of the typewriter alphabet common in the
USA. Which is as irrelvant for my statement above.

The difference between ASN.1 and XML here is that ASN.1 is
designed (and optimized) for one particular thing.

In other words, the difference is that ASN.1 actually has a purpose
and is capable of fullfilling it :->. But even this is a statement I
would not generally agree with. It is, for instance, possible to find
a document regarding the genesis of the PER (packed encoding rules) on
the web, which basically states that it was originally conceived by a
bunch of drunk academics who gathered for a big frust party after a
shorter than expected international conference where the intended to
demonstrate their proprosals for a modified BER (basic encoding rules)
and at least the author of this text believes that the
PER-specification would be so confusingly written and difficult to
understand that he recommends against even contemplating to implement
it. Combining this fact with another experience, namely, that
abstract, general solutions for a class of (believed to be) related
problems are usually desired by people having troubles with solving
the actual problems themselves yields 'PER is an encoding format
designed by a bunch of drunk people who had problems with designing
encoding formats'.

It is anybody own descision to somehow conceive this as a positive
recommendation.

Apart from this IMO amusing anecdote, ASN.1 is a general language for
describing structured types to be used in inter-machine
communication. It is claimed that it would be possible to "takes as
input any schema written in XML Schema" and to produce "an ASN.1
module containing a set of type definitions in such a way that there
is a one-to-one correspondence between ASN.1 abstract values and valid
XML instances" (http://asn1.elibel.tm.fr/xml/). Usual ASN.1 encodings
(the only I have any familiarity with being BER) are still better for
inter-machine communication, because while they are already 'weird' on
their own (eg using at least two different ways to encode integers),
the messages themselves can be a lot smaller by means of omitting all
the 'hot air' contained in ASCII itself and using a representation for
syntactical structures which can be processed by a computer with much
less effort than it would need to parse a text.

For instance, for any type of OLTP, the savings can be directly
expressed as $$$ * n, n being the amount of transactions processed so
far.
.



Relevant Pages

  • Re: XmlTextWriter Encodes HTML Entities?
    ... Most of us and most documentation including W3C documentation define & ... drop the verbiage "HTML" when describing character entities. ... XML but not part of HTML, while ö is part of HTML but not of XML; ... use of the language. ...
    (microsoft.public.dotnet.xml)
  • Re: UTF-8 practically vs. theoretically in the VFS API (was: Re:
    ... > encoding to convert from. ... It's the user who made the filename, ... > purpose was translating to a non-latin language. ... There is absolutely no need to know the charset until the point when the ...
    (Linux-Kernel)
  • Re: Mix Characters
    ... I will try as you said to get an answer from a Windows forum..if i will find ... encoding do you have the " always save the web page in the default encoding" ... Perhaps go to your Control Panel> Regional and Language Options dialog ... "If you remap your keybord to another character set, ...
    (microsoft.public.publisher.webdesign)
  • Re: Mix Characters
    ... I will try as you said to get an answer from a Windows forum..if i will ... encoding do you have the " always save the web page in the default ... Perhaps go to your Control Panel> Regional and Language Options dialog ... "If you remap your keybord to another character set, ...
    (microsoft.public.publisher.webdesign)
  • Re: Want Input boxes to accept unicode strings on Standard Window
    ... If ther encoding is not specified, then the encoding is assumed to be ... Ah, UTF-8. ... That would be wrong according to the standard. ... when producing XML files. ...
    (microsoft.public.vc.mfc)