OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

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

RE: When to use XML or HTML extensions?



Hewko, Doug inquired:

> Thanks for the reply. If you use a XML file, then aren't you limiting
> yourself to just one style sheet? Or maybe my understanding of XML is
still
> too narrow.

The samples kind of look that way, don't they?

(If my explanation is confusing, overly simplistic, or just plain wrong,
somebody correct me.)

But what you usually do is keep the information part in one file. If you use
a Document Type Definition, that will usually be kept in a separate file,
and the information file will just refer to it. Then your
styles/transformations are kept in yet other files.

Now, to (for example) make something show up on a screen somewhere, you
could make a file (call it a combining file?) which refers to both a
style/transformation file and to the information file, and this is the file
that you feed into the target browser or other parser.

Of course, the combining file doesn't really have to exist, it can be
generated on the fly by a cgi or something.

Really, you can generate any or all of the files on the fly, but don't think
about that.

> As an example, take a phone list, which is a *.xml file because that's the
> easiest to start using. If you want the same data to be displayed in
> multiple ways (ie. sorted alphabetically or by location), then shouldn't
you
> use *.html files?

Answering the question you should be asking:

If you fed the combining "file" to a parser, you can save the output of the
transformation in an (intermediate?) HTML file if you want, or you can send
it straight to a browser. This sort of intermediate representation is useful
when you can't be sure that everyone in your target audience is using a
browser that can do the parsing internally. (Is it correct to be claiming
that the parser is doing the transformation here?)

But answering the question you are probably asking:

Burying XML-style markup in HTML files is not really XML. It's just a
handy-dandy trick that kind of short-circuits the concepts of XML. It
probably makes some things easier at first, but you'll eventually want to
get away from that kind of thinking. (Could I compare this to old BASIC
programs that store their data in DATA statements in the program itself, as
opposed to reading the data from a file?)

Now I'll shut up and let someone who really knows what he's doing have a
turn.

Joel Rees
programmer -- rees@mediafusion.co.jp
----------------------------------------------------
To be a tree supporting all information,
  giving root to the chaos
    and branches to the trivia,
      information breathing anew --
        This is the aim of Yggdrasill.
============================XML as Best Solution===
Media Fusion Co. ,Ltd.  株式会社メディアフュージョン
Amagasaki  TEL 81-6-6415-2560    FAX 81-6-6415-2556
    Tokyo TEL 81-3-3516-2566   FAX 81-3-3516-2567
                       http://www.mediafusion.co.jp
===================================================