Hi all,
> Can we use CDATA junks to avoid having to escape script?
Yes. And the editor could/should have a double-click action to open a
simple text editor for scripts. Maybe even give the option to select
your own editor via a preference item.
> > <option description="Local events file" type="string"
> > name="localeventsfileurl">localevents.xml</option>
>
> ...after I added some <possible_value /> elements like
> so [1], it seemed a bit unweildy [2]. Plus I think it
> might introduce some problems dealing with unintentional
> carriage returns. Not sure though, it does seem weird
> to use the element text for <possible_value /> but
> not for <option />.
The <possible_value /> subitems look more like an enumeration to me, why
not use <enum />? Also, unless the content is a cdata blob it is best to
confine logical content to attributes.
> And, 'description' > 'display_name', agreed, but how about
> 'caption'...
Agreed. But I think we ought to use the same structure as consistently
as possible. Instead of using caption here and display there, use
caption everywhere. Actually, title would probably be more appropriate,
and more consistent with existing W3 standards.
And, not to get all literal, but "option" seems a little misplaced when
talking about each individual preference item. How about "item"?
Revised samples:
<item title="Reuse browser window mode" type="int"
name="reuseBrowserWindowMode" value="0">
<enum title="Possible window mode values">
<option title="New window always" value="0" default="1" />
<option title="Single window for all" value="1" />
<option title="Single window for each search type" value="2" />
</enum>
</item>
<item title="Local events file" type="string"
name="localeventsfileurl" value="localevents.xml" />
<item title="Local events file" type="string"
name="localeventsfileurl" oninvoke="javascript:getGoogleCal();"
src="http://www.google.com/calendar/feeds/userID/cookie/basic">
<script><![CDATA[
function getGoogleCal(){
/* a script to process the url and *
* convert it to event data format */
}
]]></script>
</item>
<item title="Events file for the popup calendar events"
type="string" name="eventsfileurl" value="holidays.us.xml">
<enum select="locality">
<option title="United States" locale="us"
value="holidays.us.xml" default="1" />
<option title="Canada" locale="ca"
value="holidays.ca.xml" />
<option title="Singapore" locale="sg"
value="holidays.sg.xml" />
<option title="Italy" locale="it"
value="holidays.it.xml" />
<option title="France" locale="fr"
value="holidays.fr.xml" />
<option title="Netherlands (Dutch)"
locale="nl" value="holidays.nl.NL.xml" />
<option title="Netherlands (English)"
locale="nl-en" value="holidays.nl.EN.xml" />
<option title="Estonia" locale="et"
value="holidays.et.xml" />
<option title="Other" value="." widget="browse" />
</enum>
</item>
This could theoretically enable us to interpopulate live web data with
DQSD much easier than using invoked scripts each time. Something like
referencing an internet CSS file (maybe they're on a public server that
loads a random image in the background every hour?) could make DQSD more
"fun" for the non-technophile crowd. Stuff like self-drawn DQSD-hosted
widgets would be a real possibility with the right forward-thinking data
structure.
Okay, how about "priority"? Would it be feasible to add an optional
attribute to each <item /> to specify the priority of item processing?
Highest number goes first, everything else follows inline afterwards or
something like that? I guess we could have the editor (list-view style)
provide an option to sort items up or down and then the file could be
processed sequentially, but it would be better to know that no matter
what a preferred option would be set first.
And "group" for categorizing items. Some items need to be grouped in the
editor:
<item title="User address" type="string"
group="address" name="user_address"
value="1600 Pennsylvania Ave" />
<item title="User city" type="string"
group="address" name="user_city"
value="Washington" />
<item title="User state" type="string"
group="address" name="user_state"
value="DC" />
<item title="User ZIP" type="string"
group="address" name="user_zip"
value="20509" />
Regards,
Shawn K. Hall
http://12PointDesign.com/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel