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

Re: Writing technical text



On Fri, Oct 21, 2005 at 10:51:07AM +0100, Antony Gelberg wrote:
> William Ballard wrote:
> > Single-letter element-centric XML is fairly readable:
> > 
> > <o><t/>
> >   <p><o><p/><e>14</e><e>32</e></o></p>
> >   <p><o><m/><e>18</e><e>92</e></o></p>
> > </o>
> 
> You are joking, right?

You're just not used to it.  Once you get the hang of the "context" -- 
i.e., in that, <o/> means operation, first child of <o/> is the 
operator, example operators are times <t/> and plus <p/>, subsequent 
children of <o/> are operands, valid operands are either sub-operations 
<o/> or parenthesis <p/> for grouping, <e/> contains only text values 
which are numbers.

I have carried this kind of thing out to express an entire relational 
database, including emedded schema, lookups, and computed columns, as a 
concise XML document that is easy to grasp at a glance and easy to 
maintain by hand in an editor.

Here is an example.  Look f'd up to you?

<?xml version="1.0"?>
<schema>

<s><n>Todo</n>
<t><n>td date Date</n>
<c><n>d date Date</n><e>text</e><f>date</f></c>
<c><n>n note Note</n><e>note</e></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
<t><n>r recur Recurrence</n>
<c><n>i id #</n><e>counter</e></c>
<c><n>r recur Recurrence</n><e>text</e></c>
<c><n>c code Code</n><e>text</e><x/></c></t>
<t><n>rd recurdate Recurring Date</n><b>r</b>
<c><n>i id #</n><e>counter</e></c>
<c><n>s start Start</n><e>text</e><f>date</f></c>
<c><n>e end End</n><e>text</e><f>date</f><b/></c>
<c><n>r recur Recurrence</n><e>lookup</e><t>r</t></c>
<c><n>rn recurn Recurrence N</n><e>text</e><f>number</f><b/></c>
<c><n>c current Current</n><e>text</e><f>date</f><b/><x/></c>
<c><n>n note Note</n><e>note</e></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
<t><n>c cat Category</n><b>r</b>
<c><n>i id #</n><e>counter</e></c>
<c><n>c cat Category</n><e>text</e></c></t>
<t><n>tt task Task</n><b>c</b>
<c><n>c cat Category</n><e>lookup</e><t>c</t></c>
<c><n>n note Note</n><e>note</e></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
</s>

<s><n>Book</n>
<t><n>bw want Want</n>
<c><n>a author Author</n><e>text</e></c>
<c><n>t title Title</n><e>text</e></c>
<c><n>n note Note</n><e>note</e><b/><x/></c></t>
</s>

<s><n>Account</n>
<t><n>aa address Address</n>
<c><n>i id #</n><e>counter</e></c>
<c><n>a address Address</n><e>text</e></c>
<c><n>c city City</n><e>text</e></c>
<c><n>s state State</n><e>text</e></c>
<c><n>z zip Zip</n><e>text</e><f>zip</f></c></t>
<t><n>ap phone Phone</n>
<c><n>i id #</n><e>counter</e></c>
<c><n>p phone Phone</n><e>text</e><f>phone</f></c>
<c><n>c comment Comment</n><e>text</e></c></t>
<t><n>an name Name</n>
<c><n>i id #</n><e>counter</e></c>
<c><n>n name Name</n><e>text</e></c></t>
<t><n>ae email E-Mail</n>
<c><n>e email E-Mail</n><e>text</e><f>email</f></c>
<c><n>u usedby Used By</n><e>note</e><x/></c></t>
<t><n>ac account List</n><b>aa</b>
<c><n>i id #</n><e>counter</e></c>
<c><n>act account Account</n><e>text</e></c>
<c><n>num number Number</n><e>text</e><x/></c>
<c><n>usr user User</n><e>text</e><x/></c>
<c><n>pwd password Password</n><e>text</e><x/></c>
<c><n>cl closed Closed</n><e>check</e><f>Closed|</f></c>
<c><n>a address Account Address</n><e>lookup</e><t>aa</t><b/><x/></c>
<c><n>m mailto Mailing Address</n><e>lookup</e><t>aa</t><b/><x/></c>
<c><n>p phone Phone</n><e>lookup</e><t>ap</t><b/><x/></c>
<c><n>n name Name</n><e>lookup</e><t>an</t><b/><x/></c>
<c><n>l lead Pay Lead Days</n><e>text</e><f>number</f><b/><x/></c>
<c><n>ap acctph Acct. Phone</n><e>text</e><b/><x/></c>
<c><n>x extra Extra</n><e>note</e><b/><x/></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
</s>

<s><n>Contact</n>
<t><n>fam-a family_address Family Address</n>
<c><n>i id #</n><e>counter</e></c>
<c><n>a address Address</n><e>text</e></c>
<c><n>c city City</n><e>text</e><x/></c>
<c><n>s state State</n><e>text</e><x/></c>
<c><n>z zip Zip</n><e>text</e><f>zip</f><x/></c>
<c><n>p phone Phone</n><e>text</e><f>phone</f><b/></c></t>
<t><n>fam-n family Family</n><b>fam-a</b>
<c><n>n name Name</n><e>text</e></c>
<c><n>b bday Birthday</n><e>text</e><b/></c>
<c><n>e email E-Mail</n><e>text</e><f>email</f><b/><x/></c>
<c><n>ce cell Cell</n><e>text</e><f>phone</f><b/><x/></c>
<c><n>a address Address</n><e>lookup</e><t>fam-a</t><x/></c>
<c><n>c current Current</n><e>text</e><f>date</f><b/><x/></c>
<c><n>x extra Extra</n><e>note</e><b/><x/></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
<t><n>work work Work</n>
<c><n>co context Context</n><e>text</e></c>
<c><n>f first First</n><e>text</e><b/></c>
<c><n>l last Last</n><e>text</e><b/></c>
<c><n>a address Address</n><e>text</e><b/><x/></c>
<c><n>c city City</n><e>text</e><b/><x/></c>
<c><n>s state State</n><e>text</e><b/><x/></c>
<c><n>z zip Zip</n><e>text</e><f>zip</f><b/><x/></c>
<c><n>e email E-Mail</n><e>text</e><f>email</f><b/></c>
<c><n>p phone Phone</n><e>text</e><f>phone</f><b/></c>
<c><n>ce cell Cell</n><e>text</e><f>phone</f><b/><x/></c>
<c><n>x extra Extra</n><e>note</e><b/><x/></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
</s>

<s><n>Cash</n>
<t><n>bil bill Bill</n>
<c><n>p paid Paid</n><e>text</e><f>date</f><b/></c>
<c><n>ac acct Account</n><e>lookup</e><t>ac</t></c>
<c><n>b bild Bill Date</n><e>text</e><f>date</f><b/><x/></c>
<c><n>r rcvd Received</n><e>text</e><f>date</f><x/></c>
<c><n>d due Due</n><e>text</e><f>date</f><b/><x/></c>
<c><n>am amt Amount</n><e>text</e><f>currency</f></c>
<c><n>n note Note</n><e>note</e><b/><x/></c>
<c><n>u unique Unique ID</n><e>unique</e><x/></c></t>
</s>

<s><n>Other</n>
<t><n>sert serialtype Serial Type</n>
<c><n>i id #</n><e>counter</e></c>
<c><n>t type Type</n><e>text</e></c></t>
<t><n>ser serial Serial</n><b>sert</b>
<c><n>p product Product</n><e>text</e></c>
<c><n>t type Type</n><e>lookup</e><t>sert</t></c>
<c><n>u user User Name</n><e>text</e><b/><x/></c>
<c><n>s serial Serial/Pin</n><e>text</e><x/></c>
<c><n>n note Note</n><e>note</e><b/><x/></c></t>
<t><n>ac-a acctadr Account Address</n>
<c><n>ac acct Account</n><e>lookup</e><t>ac</t></c>
<c><n>a address Address</n><e>text</e><b/></c>
<c><n>c city City</n><e>text</e><b/></c>
<c><n>s state State</n><e>text</e><b/></c>
<c><n>z zip Zip</n><e>text</e><f>zip</f><b/></c></t>
<t><n>tire tire Tire Pressure</n>
<c><n>d date Date</n><e>text</e><f>date</f></c>
<c><n>m msg Message</n><e>text</e></c>
<c><n>n note Note</n><e>note</e><b/></c></t>
</s>

</schema>



Reply to: