groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (off topic?) Docbook? Re: manlint?


From: Marc Chantreux
Subject: Re: (off topic?) Docbook? Re: manlint?
Date: Tue, 15 Sep 2020 17:11:33 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

hello,

> XML is verbose, cumbersome to read and write, and has two different ways to
> express data structures

> <doc title="My stupid document" enabled="true"></doc>
> <doc>
>     <title>My stupid document</title>
>     <enabled>true</enabled>
>     <enabled />
> </doc>

this *isn't* the same to me: attributes are for metadata and tag
contents are for data. but the thing is: because xml is so painful
to edit, people (including me) started to abuse metadata.

pug (pugjs.org/) restored the balance in my xml galaxy:

    doc
        title My stupid document
        enabled/

seems ok to me.

> Conversely, JSON is more concise and predictable

json is more relevant than xml to store datastructures, right, but
i just said anything positive i can tell about JSON ...

> { "title": "My stupid document", "enabled": true }

how about the example that follows ?
regards
marc

<doc>
    <title>My stupid document</title>
    <enabled>true</enabled>
    <abstract>
    this is about trying to explain that <format id="json"/>
    is way inferior to
    <enum of="file-formats">
        <format>roff</format>
        <format>tex</format>
        <format>tex</format>
    </enum>
    in some situations. but when i want to store data, my first
    attempt  will be cbor to exchange and tsv to edit (or using ascii
    separators from 0x1c to 0x1f). another solution i like is the
    one i saw from time to time but don't know if it ever has a name.
    here is an example:
<snippet>
%T My stupid document
%E not sure anymore ...
</snippet>
    </abstract>
</doc>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]