Here's some feedback from the developer of the XML editor XMLBuddy,
regarding DTD and other
schemas for use with  an XML editor

---------- Forwarded message ----------
From: Bob Foster <[EMAIL PROTECTED]>
Date: Oct 14, 2007 5:24 PM
Subject: Using XMLBuddy with OpenLazlo
To: [EMAIL PROTECTED]


Hi Henry,

I'm pretty sure I don't understand all your requirements or the
OpenLazlo workflow. I got into this because an XMLBuddy Pro customer
bought it because of the XMLBuddy mention in your documentation. He
immediately ran into problems, which I listed in my post:

- You allow users to add new element types into an otherwise structured
element. There is no way to capture this in a DTD, so people using DTDs
will always see errors.

- Both the XSD and RNG schemas you provide have errors, which means they
can't be used for validation. At a very cursory glance, they don't do
what you want, either.

You could allow new element types in XSD or RNG schemas by using
wildcards, but only if those elements are in a different namespace than
the structured elements that enclose them. IIRC, putting all elements in
the same namespace as your examples do won't work in these languages,
either. The only standard schema language that might possibly validate
this is Schematron, but I can't help with that, because I don't know it
and XMLBuddy doesn't support it.

Given what I know so far, I'd suggest dropping the DTDs along with RNG,
use only XSD and either extend or restrict your language so it can be
validated by XSD.

If it means anything, the free version of XMLBuddy will validate
documents with XML schemas. The difference between free and Pro is, in
the former the user must specify an explicit schemaLocation in the document.

Bob



----------------
Hi Bob,

I just finished doing some work related to getting rid of our RNG-based
schema and using a simpler internally developed XML base schema
description. My plan
is to have the compiler generate a DTD for the base class libraries and
component libraries, and also to have an option for it to generate a DTD
for a developers application at compile time.

As David mentioned, our syntax is extensible because when the user
defines a new class, it becomes a valid tag in the language. It is also
the case that
there are a few special case tag formats, where the valid syntax
permissible for the
child elements depends on the value or presence of some of the parent
element's attributes. For that reason, a fixed DTD won't really cover a
real world application that has user-built or 3rd party class libraries,
so I'd like to discuss with you some possible approaches to making such
development work with your editor.

If you can give me an example of what the most efficient and compact DTD
representation would be for your editor, I would like to give a try at
having our
compiler generate that. It may not be possible to completely validate a
Laszlo program with any static DTD, but at least it ought to be possible
to formulate a DTD which captures the majority of the syntax
requirements, without
giving errors. Our compiler can then catch and warn about any further
issues when the program is compiled.


You can email me directly at hminsky at laszlosystems.com, and if you
join the laszlo-dev or laszlo-users mailing list, we could involve the
community in the discussion.
__________________
Henry Minsky
Software Architect
Laszlo Systems Inc.



-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to