On Tuesday, February 18, 2003, at 12:09 PM, Hussein Shafie wrote:

> Jeremy Quinn wrote:
>>
>> I need to make a schema to edit 'xml components' for our site that may
>> have the Apache Cocoon SQL Query tags inside.
>>
>> They look something like this:
>>
>> <component xmlns="http://www.xmlmind.com/xmleditor/schema/iniva";>
>>   <meta>
>>    <title>curators</title>
>>    <desc>gets the list of all people who are curators, optionally uses
>> the 'count-paging' interface.</desc>
>>   </meta>
>>   <chapter type="people">
>>    <meta>
>>     <title>all curators</title>
>>     <desc>the list of all curators in the archive</desc>
>>    </meta>
>>    <execute-query xmlns="http://apache.org/cocoon/SQL/2.0";>
>>     <query name="count-paging">
>>      SELECT COUNT(*) AS total
>>      FROM person p, typereference t
>>      WHERE p.id = t.id AND t.typeid = 8
>>     </query>
>>    </execute-query>
>>    <execute-query xmlns="http://apache.org/cocoon/SQL/2.0";
>> xmlns:sql="http://apache.org/cocoon/SQL/2.0";>
>>     <query name="curators">
>>      SELECT p.id AS personid, CONCAT(p.firstname,' ', p.surname) AS 
>> title
>>      FROM person p, typereference t
>>      WHERE p.id = t.id AND t.typeid = 8
>>      ORDER BY p.surname
>>      LIMIT <substitute-value sql:name="start"/>,<substitute-value
>> sql:name="count"/>
>>     </query>
>>    </execute-query>
>>   </chapter>
>> </component>
>>
>> I would like to make one XSD file for the 'iniva:component' part of
>> this and a separate XSD file for the sql:execute-query aspect of it, 
>> as
>> this can be separately contributed to the Apache Cocoon project (where
>> I am a committer).
>>
>> What I am confused about is the issue of the fixed default namespace
>> for XSD used by the free version of XXE. ie. I HAVE to use the
>> 'http://apache.org/cocoon/SQL/2.0' namespace in these documents.
>>
>> Will this be possible?
>
> Yes, but you need to purchase the Professional Edition of XMLmind XML
> Editor.
>
>
>
>> Can you give me an example of how the <xsd:schema> header (NS
>> declarations) would look like?
>
> Please find attached to this email a working example:
>
> * component.xml is the <component> above.
>
> * component.xsd is a simple schema for <component> which imports
> cocoon.xsd. Its target namespace is
> "http://www.xmlmind.com/xmleditor/schema/iniva";.
>
> * cocoon.xsd is a simple schema for <execute-query>. Its target
> namespace is "http://apache.org/cocoon/SQL/2.0";.
>
>
>
>> PS. I do seem to be able to switch to using the SQL namespace as a
>> prefixed rather than default namespace in these documents, is this the
>> answer?
>
> If you do not want to purchase Professional Edition and intend to
> continue using Standard Edition, the cleanest thing to do is to edit 
> the
> XML-Schemas from Cocoon and change their target namespaces from
> "http://apache.org/cocoon/SQL/2.0"; to something like
> "http://www.xmlmind.com/xmleditor/schema/cocoon/SQL/2.0";.
>
> My working example still applies in such case. Just edit the 3 files
> using a text editor and change "http://apache.org/cocoon/SQL/2.0"; to
> "http://www.xmlmind.com/xmleditor/schema/cocoon/SQL/2.0"; then you can
> play with component.xml using XXE Standard  Edition.<iniva.zip>

Many thanks for this.
I got something very similar to this working late last night.

Still, I picked up some handy tips from your example!


regards Jeremy



Reply via email to