hi all,

I am using AxKit built from CVS and I encountered a problem when I am trying to use xsp;attribute on a namespaced attribute name e.g. rdf:resource - for example, my XSP pages has to generate some RDF/XML FOAF profile info like:

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="NULL" type="application/x-xsp" ?>
<?xml-stylesheet href="foo.xsl" type="text/xsl"?>

<xsp:page
        xmlns:xsp="http://apache.org/xsp/core/v1";
        xmlns:param="http://axkit.org/NS/xsp/param/v1";
        xmlns:auth="http://www.nichework.com/2003/XSP/BasicAuth";
        xmlns:session="http://www.axkit.org/2002/XSP/BasicSession";
        xmlns:util="http://apache.org/xsp/util/v1";
        xmlns:web="http://axkit.org/NS/xsp/webutils/v1";
        >

<my:page
    version="1.0"
    xml:lang="en"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
        xmlns:foaf="http://xmlns.com/foaf/0.1/";
        >

<xsp:logic>my $user = myspace::get_user_by_email( <auth:get-username/> );</xsp:logic>

<foaf:Person>
<foaf:mbox>
<xsp:attribute name="rdf:resource"><xsp:expr>myspace::get_value_by_xpath( $user, '/rdf:RDF/foaf:Person/foaf:mbox/@rdf:resource' );</xsp:expr></xsp:attribute>
</foaf:mbox>
</foaf:Person>


</my:page>

</xsp:page>

then the XSLT layer 'foo.xsl' contains an expression like

        <xsl:value-of select="/my:page/foaf:Person/foaf:mbox/@rdf:resource"/>

which does *not* match on the above foaf:mbox/xsp:attribute built element - if I replace rdf:resource with resource (no namespace) things work out fine.

I think is a problem with some default/no-namespace set by AxKit - while I think systems like Cocoon deals with special prefix and uri attributes to xsp:attribute tag to specify the attribute namespace information. In fact I googled and found the following reference

        http://wiki.apache.org/cocoon/XSPSyntax

which I tried on the above foaf:mbox like

<foaf:mbox>
<xsp:attribute prefix="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; name="resource"><xsp:expr>myspace::get_value_by_xpath( $user, '/rdf:RDF/foaf:Person/foaf:mbox/@rdf:resource' );</xsp:expr></xsp:attribute>
</foaf:mbox>


but I get the same (no) result for @rdf:resource XPath expression.

Then I digged into Apache::AxKit::Language::XSP and it seems nothing special is done to deal namespaces for xsp:attribute - or am I missing something?

Any quick fix I can adopt to get the above working?

thanks all

Yours

Alberto

-
Alberto Reggiori, @Semantics S.R.L.
www.asemantics.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to