Drat. The extended solution below is so close. (Every time,
I think I have it...)
The solution described below fails to handle the creation of
new elements. When you create a <sect1> instance, for example,
the editor needs to know that an invisible <title> element must
be created after it.
The DTD could be analyzed of course. But we already discussed
the difficulty of doing that (plus analysing any other schemas)
in the original post.
That leaves only one alternative: "invisible" nodes must be
specified in pairs: <sect1>+<title>, <head>+<title>, etc.
That pretty much destroys any value for "global editor defaults",
But still allows for way-simple simple "editSheets" to control
outline formatting in the editor.
Eugene Eric Kim wrote:
>
> 1. ...I'm not so sure defaulting to an outline view
> and allowing the simple creation of style sheets is such a bad
> solution....the user could open up a stylesheet editor and choose to
> display <b> as inline text, in which case the appropriate XSL
> stylesheet would be created....
>
To summarize, the original post argued down to "leave XML as it is
and put the smarts in the editor". In yesterday's meeting, you also
agreed that it makes a lot of sense to define a minimum set of inline
tags that the editor recognizes -- <b>, <i>, <u>, for example. (Tags
like <a href=""> are more problematic, but probably manageable.)
My favorite example is <def> to indicate a term that is defined in
the current paragraph. By default, <def> would display hierarchically.
But a global editor default could be specified that causes <def>
to display inline as though it were <i>. For some file types, that
global default could be overridden so that <def> reverts to a
hierarchical display (aka "structure element").
So far so good. What I find missing in my original proposal, though,
is a solution to the "invisible node" problem. That's the one where
we want to make <sect1><title>....</title><sect1> appear as
<sect1>....</sect1> in the display in order to obtain a "natural
outline" of the data (although the actual structure remains intact).
My current thinking is that there is a fairly standard set of
such elements that could usefully be specified as "invisible",
using a global default in the editor. Here are two examples:
Node Structure Displays as
-------- -------------- -----------
<title> <sect1> <sect1>...
<title>...
<head> <head>...
<title>...
<name> <bookmark> <bookmark>...
<name>...
<contact> <contact>...
<name>...
The fact that <title> and <name> occur in multiple kinds of
files in a similar role -- as a "visible identifier" for a
node -- probably warrants their inclusion as a global defaults
in the editor. There are undoubtedly more that could be added
to the list. As with inline elements, the behaviour could be
overridden for individual files.
And that, I think, is a complete solution to the problem of
easily editing (semi-arbitrary) XML files with an editor,
and doing so in an intelligent outline form. This solution
does not require something so grand as an XSL stylesheet
(which has the power to completely specify the print-format
for a document). In contrast, it can be implemented with
a few small lists and a simple interface.
--------------------------------------------------------------------<e|-
Respond.com - Technology Solutions for your Business!
http://click.egroups.com/1/6828/5/_/444287/_/964640744/
--------------------------------------------------------------------|e>-
Community email addresses:
Post message: unrev-II@onelist.com
Subscribe: unrev-II-subscribe@onelist.com
Unsubscribe: unrev-II-unsubscribe@onelist.com
List owner: unrev-II-owner@onelist.com
Shortcut URL to this page:
http://www.onelist.com/community/unrev-II
This archive was generated by hypermail 2b29 : Wed Jul 26 2000 - 12:54:40 PDT