cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerard Maas <gerard.m...@alcatel.be>
Subject Using Xpath in Cocoon 1.8
Date Thu, 16 Nov 2000 16:55:44 GMT
Hi all,

After following the list for quite a while, the time has come when I'm
hitting my head against a cocoonish rock ;-) and here I go...

The point is the following: like many of you, I've some XML data that
I'd like to include in my 'basis' XML page. This data is coming from a
profile server in the form of a Java API call.  This data looks like:
(fake data follows)
<person id="xxxx">
    <name>
        <first>John</first>
        <last>Doe</last>
    </name>
    <preferences>
        <cities>
            <city>
                <name>NYC</name>
                <land> USA</land>
            </city>
            <city>
                <name>Caracas</name>
                <land>Venezuela</land>
            </city>
            . . .
            . . .
    </preferences>
</person>

This data is included in my 'base' xml document to fill some
placeholders: <insert source="query_name" path="//name/first">. A
typical use will be to produce a VoiceXML page that says "Welcome back
John [person/name/first], Which will be your selection today? NYC
,Caracas,... ? [for-each preferences/cities/city]...

This could be also in HTML form.

I found no straightforward way to include arbitrary pieces of my XML
Data into the static XML content, so I started a logicSheet that
translates the placeholders into references to XPath.
I used as reference the Documentation of Xalan at xml.apache.org, but it
seems that the packaque included in Cocoon 1.8 doesn't have the same
structure. org.apache.xalan.xpath vs org.apache.xpath
My question is: first: where do I find the documentation for the version
included in Cocoon 1.8?.
2.- Am I making my life misserable with this approach?
      Should I look at another way instead?

I actually thought about inserting the XML Data into the document, and
making a kind of XSLT tranformation based on the document itself, but I
seemed to me that I was going to a black hole of complexity.

Having XPath and Xslt  on board, writting somelike like eSQL for an XML
data source seems just not right to me.

I really appreciate any help.

Best Regards,

Gerard.


Mime
View raw message