cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: ESQL schema
Date Mon, 27 Nov 2000 20:04:55 GMT
On Mon, 27 Nov 2000, Paul Russell wrote:

> On Mon, Nov 27, 2000 at 01:51:59PM -0500, Donald Ball wrote:
> > On Mon, 27 Nov 2000, Drasko Kokic wrote:
> > 
> > > okay ... I would love to help you in this efort.
> > 
> > the big trouble i'm having now is trying to figure out how to state that
> > underneath esql:row-results, you can have text, elements from other
> > namespaces, and a specific set of elements from the esql namespace, in
> > arbitrary order, as many times as you like. i would have thought that the
> > schema 'all' element would be part of the solution, but from what i read
> > in the primer last night, it doesn't seem to work. got any suggestions?
> 
> <xsd:type name="ESQLResults" mixed="yes">
> 	<xsd:sequence>
> 		<xsd:choice>
> 			<xsd:element ref="esql-get-foo"/>
> 			<!-- other elements here -->
> 		</xsd:choice>
> 	</xsd:sequence>
> </xsd:type>
> 
> Will do the text and various ESQL tags, but I must admit, I
> can't remember how to say 'any other element here' :/

ooh, that's a clever one, i hadn't thought of that. i wonder why xml
schema doesn't just have an <xsd:set> element though? anyway, i think this
might work:

<element name="esql:row-results" minOccurs="0" maxOccurs="1">
  <complexType mixed="true">
    <sequence>
      <choice>
        <any namespace="##other" minOccurs="0" maxOccurs="unbounded"
          processContents="lax"/>
        <element name="esql:get-columns" minOccurs="0" maxOccurs="unbounded"/>
        <element name="esql:get-string" minOccurs="0" maxOccurs="unbounded"/>
      </choice>
    </sequence>
  </complexType>
</element>

although, i must admit, i'm not sure how to declare the "target namespace
of the type being defined". anyone?

next biggie - i've got some declarations like this:

<element name="esql:driver" type="string"/>

but, as we all know, it's not mandatory that this be an XML string, just
that it be an XSP expression that will resolve to be a string at
runtime. anyone got any clever ideas on how to do that? my best thought so
far is to allow it to contain anything _except_ xsp:logic elements. not a
perfect test, but it might be the best we can do. any ideas?

you know one thing that's really confusing about xml schema? schema
elements aren't necessarily xml elements, they might be composed of many
xml elements. i do wish they'd chosen a different name.

- donald


Mime
View raw message