[Laszlo-dev] Anyone know about XML DTD's?

David Temkin temkin at laszlosystems.com
Fri Oct 12 14:07:21 PDT 2007


>> I'm thinking of proposing a syntax for specify tag containment that
>> would extend our class declaration syntax something like this,

I like that direction

>> That's certainly possible. Of course our compiler can't deal  at all
>> with invalid  XML, so you can't get this unless you have a well  
>> formed
>> file. But if you have the classes
>> declared, even as just skeletons or interfaces,  then this would be
>> the same mechanism as I'm thinking for generating the DTD, e.g.,
>> walking the in-core class model datastructure and serializing it as a
>> DTD.


Can this be exposed as a server request type, as in lzt=dtd (or xsd??)?


On Oct 12, 2007, at 12:41 PM, Henry Minsky wrote:

> That's certainly possible. Of course our compiler can't deal  at all
> with invalid  XML, so you can't get this unless you have a well formed
> file. But if you have the classes
> declared, even as just skeletons or interfaces,  then this would be
> the same mechanism as I'm thinking for generating the DTD, e.g.,
> walking the in-core class model datastructure and serializing it as a
> DTD.
>
> I'm thinking of proposing a syntax for specify tag containment that
> would extend our class declaration syntax something like this,
>
> For example specifying that the <list> tag can contain only <listitem>
> or subclasses thereof.
>
>
> <class[or interface]  name="list">
>    <containsElements restrict="true">
>       <element>listitem</element>
>    </containsElements>
>    ...
> </class>
>
> A basic version of this syntax is used internally  in the new
> schema/lfc.lzx file for declaring the base language and LFC tag
> nesting rules.
>
>
>
>
>
>
>
>
>
> On 10/12/07, David Temkin <temkin at laszlosystems.com> wrote:
>> It would be incredibly useful to generate a DTD that includes user-
>> defined classes for a given app on the fly.
>>
>> This is really a question for laszlo-user.
>>
>> On Oct 12, 2007, at 7:55 AM, Henry Minsky wrote:
>>
>>> We're in a position now to generate an XML DTD somewhat more easily
>>> than
>>> we used to be, because of recent changes to the compiler.  The
>>> compiler has
>>> a good in-core representation of the entire class hierarchy, and
>>> some simple but
>>> effective rules about tag containment (which classes of tags can be
>>> children of which other tags).
>>>
>>> Does anyone here know enough about DTD's and real world editor tools
>>> to know what
>>> would be the most useful and compact format to generate a DTD in?  
>>> The
>>> one we used to generate was overly huge I think, and since we have a
>>> better class-oriented representation of the containment rules now, I
>>> am wondering if there is a small and simple DTD that
>>> we can generate that would of most use to people who actually use
>>> them. I personally
>>> just use emacs NXML mode for editing, so I don't have any first-hand
>>> knowledge of
>>> what would be useful to people who actually rely on other
>>> XML-DTD-aware editors.  If anyone has any examples of good DTD  
>>> formats
>>> for a similar XML-oriented programming language, I'd be  
>>> interested in
>>> seeing them.
>>>
>>>
>>>
>>> --
>>> Henry Minsky
>>> Software Architect
>>> hminsky at laszlosystems.com
>>
>>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com



More information about the Laszlo-dev mailing list