Subject: Re: [xsl] Convert JSON to XML? From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 14 May 2025 14:24:09 -0000 |
<address \xA0 street="123 Main St" \xA0 city="Townville" \xA0 state="PA"/>
A good rule of thumb for document-oriented information in XML is
that anything user-facing should be in text content, and attributes
are for "properties" of that information.
<address number="123" street="Main Street" city="Townville" state="PA"/>
St Margaret's St Rd Randall Rd
Let's suppose you have a town on the border between Germany and Poland, and you need to give both names for it in the address, marking each with its language using xml:lang. You cannot do that with attributes.
I once lived at '103 White Village, 2-20-6 Kasugachou' and 'C#BBC#BB/C#BB$C#BBC#BB C#BB,C#BBC#BB8103 C&BB%C&BB%C'BB:2-20-6' (and 'C&BB%C&BB%C'BB:2-20-6-103'), IIRC.
[...] Working from marked-up parts of textual content would have been so much easier than reconstituting international addresses from database fields.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Convert JSON to XML?, Tony Graham tgraham@ | Thread | Re: [xsl] Convert JSON to XML?, Michael Kay mike@xxx |
Re: [xsl] Convert JSON to XML?, Tony Graham tgraham@ | Date | Re: [xsl] Convert JSON to XML?, Michael Kay mike@xxx |
Month |