You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Colin Britton <cb...@centervilletech.com> on 2001/04/11 04:24:06 UTC

Namespaces

I am trying to generate valid RDF out from C2 using an XSP page, this should
be simple, however I have just noticed that any namespaces I declare in the
XSP file get removed. I need to define the rdf namespace (along with others)
and have them appear in the output.

How can I achieve this (without adding it back in useing XSLT).

example XSP file....

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://centervilletech.com/hologram/1.0/">
  <esql:connection>
   <esql:pool>boss</esql:pool>
    <esql:execute-query>
    <esql:query>select foo from bar</esql:query>
    <esql:results>
     <channel xml:lang="en" rdf:about="http://hologram.com/hologram/list">
      <title>hologram</title>
      <link>http://hologram.com/hologram/20001</link>
      <items>
       <rdf:Seq>
        <esql:row-results><rdf:li><xsp:attribute
name="resource">http://hologram.com/customerid/<esql:get-string
column="id"/></xsp:attribute></rdf:li>
        </esql:row-results>
       </rdf:Seq>
      </items>
     </channel>
     </esql:results>
   </esql:execute-query>
    </esql:connection>
 </rdf:RDF>
</xsp:page>

Output from C2.....

<rdf:RDF xmlns="http://centervilletech.com/hologram/1.0/">
     <channel xml:lang="en" rdf:about="http://hologram.com/hologram/list">
      <title>hologram</title>
      <link>http://hologram.com/hologram/20001</link>
      <items>
   <rdf:Seq>
        <rdf:li resource="http://hologram.com/customerid/200051056242567"/>
       <rdf:li resource="http://hologram.com/customerid/200092594456040"/>
        <rdf:li resource="http://hologram.com/customerid/20009215153715"/>
        <rdf:li resource="http://hologram.com/customerid/20009211264976"/>
        <rdf:li resource="http://hologram.com/customerid/200092322133194"/>
        <rdf:li resource="http://hologram.com/customerid/200092411733507"/>
        <rdf:li resource="http://hologram.com/customerid/2000101642215810"/>
        <rdf:li resource="http://hologram.com/customerid/2000101360015989"/>
        <rdf:li resource="http://hologram.com/customerid/2000101885716152"/>
        <rdf:li resource="http://hologram.com/customerid/2000102990317575"/>
        <rdf:li resource="http://hologram.com/customerid/2000103270219075"/>
</rdf:Seq>
      </items>
     </channel>


 </rdf:RDF>


rgds
CB


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org