You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Per-Olof Norén <pe...@alma.nu> on 2001/10/04 19:04:42 UTC

SQLTransformer doesn´t output namespace prefixes?

Hi,
I´m currently implementing a kind of "backend" pipeline for a cocoon.
The concept is a xml based command language that encapsulates and "objectifies" the underlying relational database model.

pipeline:
1. xslt transform ( parsing the criteria part of the command into sql query)
2. sql transformer 
3. xslt transform (parsing the extent ie data to view, and creating queries)
4. sql transformer 
5. xslt (creating the response)

protocol is something like this:

initial file looks something like this:

<cmd:command>
    <cmd:criteria>
        <cmd:criterion type="type">value</cmd:criterion>
    </cmd:criteria>
    <cmd:extents>
        <cmd:extent type="type">parameter</cmd:extent>
    <cmd:extents>
</cmd:command>

after xslt transformation

<cmd:command>
    <sql:execute-query>
        <sql:doc-element>objects</sql:doc-element>
        <sql:row-element>object</sql:row-element>    
        <sql:query> THE QUERY </sql:query>
    </sql:execute-query>
    <cmd:extents>
        <cmd:extent type="type">parameter</cmd:extent>
    <cmd:extents>
</cmd:command>

after sql transformer:

 <cmd:command>
    <objects>
        <object>...</object>
    <objects>
    <cmd:extents>
        <cmd:extent type="type">parameter</cmd:extent>
    <cmd:extents>
</cmd:command>


No sql prefix is outputted on the objects tag!  The outputted namespace uri is correct, though
Looking into the code of the SQLTransformer one detects that
there is no implementation of the start- and endPrefixMapping.
To my knowledge, there is no way of knowing the prefix to output
if the start- and endPrefixMapping methods aren´t implemented?

Is there a design reason for not to output prefixes?
If there is, please let me know.
I will probably implement the prefix outputting mechanism if there is no reason.

Thx in advance
Per-Olof Norén
Stockholm, Sweden