On 5/16/06, Joshua Scott <[EMAIL PROTECTED]> wrote:
I had this same problem. Doug might want to error a validation error when
this happens.

It's perfectly reasonable to have no <object> tags - if you are just
managing simple tables with no relationships (I have some applications
like that). Reactor behaves like most frameworks that rely on XML: it
looks for tags that match what it wants using xmlSearch(), e.g.,
"/reactor/objects/object", and if it doesn't find anything, it is
perfectly happy.

XML validation is the *developer's* job - use an XML validation tool,
such as the XML Buddy plugin for Eclipse. Of course, you need a DTD
which we don't have yet...

I got XML Buddy to generate a DTD from the Blog sample app which I'm
pasting in here. This will need quite a bit of work to be fully usable
but I'm hoping some enterprising person here will volunteer to work on
the DTD for Doug!

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated from Reactor.xml by XMLBuddy -->
<!ELEMENT config (project,dsn,type,mapping,mode)>
<!ELEMENT dsn EMPTY>
<!ATTLIST dsn value NMTOKEN #REQUIRED>
<!ELEMENT field EMPTY>
<!ATTLIST field
        name NMTOKEN #REQUIRED
        sequence NMTOKEN #REQUIRED

<!ELEMENT hasMany (link,relate?)>
<!ATTLIST hasMany name NMTOKEN #REQUIRED>
<!ELEMENT hasOne (relate)>
<!ATTLIST hasOne
        alias NMTOKEN #IMPLIED
        name NMTOKEN #REQUIRED

<!ELEMENT link EMPTY>
<!ATTLIST link name NMTOKEN #REQUIRED>
<!ELEMENT mapping EMPTY>
<!ATTLIST mapping value CDATA #REQUIRED>
<!ELEMENT mode EMPTY>
<!ATTLIST mode value NMTOKEN #REQUIRED>
<!ELEMENT object (field|hasMany|hasOne)*>
<!ATTLIST object name NMTOKEN #REQUIRED>
<!ELEMENT objects (object+)>
<!ELEMENT project EMPTY>
<!ATTLIST project value NMTOKEN #REQUIRED>
<!ELEMENT reactor (config,objects)>
<!ELEMENT relate EMPTY>
<!ATTLIST relate
        from NMTOKEN #REQUIRED
        to NMTOKEN #REQUIRED

<!ELEMENT type EMPTY>
<!ATTLIST type value NMTOKEN #REQUIRED>
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to