Ivan,

Oh, thank you.  Obviously, I'm displaying it in a browser, so obviously
the browser is interpreting the XML tags as markup, so really, really
obviously, they don't display.

I spent so much time trying to figure out all the new stuff that I
ignored stuff I could have easily spotted a dozen years ago.

-Sam

On Thu, 2010-03-25 at 09:47 +0300, Ivan Shcheklein wrote:
> Sam,
> 
> Do you want to display results via browser in HTML form?
> 
> I believe you have to escape tags, amps, etc to get valid HTML in your
> result string. For example:
> 
> <pre>
> &lt;a&gt;aaaaa&lt;/a&gt;
> </pre>
> 
> Ivan
> 
> On Wed, Mar 24, 2010 at 9:24 PM, Sam Jones <[email protected]>
> wrote:
>         Hello folks,
>         
>         Drat.  I mean Nikolay Zavaritsky's PHP API by way of my
>         inability to
>         cross reference columns in a table.
>         
>         The PHP code is very short:
>         
>         
>          sedna_connect('localhost','auction','samjones','password');
>                sedna_execute(<<<EOM
>         for \$p in document("auction")/site/people/person
>         let \$l := for \$i in
>         document("auction")/site/open_auctions/open_auction/initial
>                  where \$p/profile/@income > (5000 * \$i/text())
>                  return \$i
>         where  \$p/profile/@income > 50000
>         
>         return <person>
>            <name>{\$p/name/text()}</name>
>            <items>{\$l}</items>
>         </person>
>         EOM
>         );
>                print "<pre>\n"; var_dump(sedna_result_array());
>         
>         And to recap, what I want is a more structured response -- XML
>         or nested
>         arrays.
>         
>         -Sam
>         
>         
>         > Hi Sam,
>         >
>         >
>         > Do you mean Alexander's Delphi API?
>         >
>         > Please, post there also an example of code you run.
>         >
>         > Ivan Shcheklein,
>         > Sedna Team
>         >
>         > On Wed, Mar 24, 2010 at 8:05 PM, Sam Jones
>         <[email protected]>
>         > wrote:
>         >         Hello Everyone,
>         >
>         >         I'm new to Sedna and new to Xquery, so I'll have to
>         ask some
>         >         patience.
>         >         I'm using Alexander Kardailsky's PHP API for Sedna.
>          I'm
>         >         executing
>         >         commands that se_terms return as multi-level XML,
>         but the API
>         >         returns an
>         >         indexed array of strings.
>         >
>         >         Here's an example which is a slightly modified
>         version of
>         >         sample07.xquery on the auction database shipped with
>         the Sedna
>         >         binary:
>         >
>         >         for $p in document("auction")/site/people/person
>         >         let $l := for $i in
>         >
>         document("auction")/site/open_auctions/open_auction/initial
>         >                  where $p/profile/@income > (5000 *
>         $i/text())
>         >                  return $i
>         >         where  $p/profile/@income > 50000
>         >         return <items>{attribute person {$p/name/text()},
>         >                       count($l)}</items>
>         >
>         >         In se_term, this query returns this XML:
>         >
>         >         <person>
>         >          <name>Huei Demke</name>
>         >          <items>
>         >            <initial>9.88</initial>
>         >            <initial>4.12</initial>
>         >          </items>
>         >         </person>
>         >         <person>
>         >          <name>Jarkko Nozawa</name>
>         >          <items>
>         >            <initial>9.88</initial>
>         >            <initial>4.12</initial>
>         >          </items>
>         >         </person>
>         >         <person>
>         >          <name>Laurian Grass</name>
>         >          <items>
>         >            <initial>9.88</initial>
>         >            <initial>4.12</initial>
>         >          </items>
>         >         </person>
>         >
>         >         Here's the PHP results of the same query.
>         >
>         >         array(3) {
>         >          [0]=>
>         >          string(121) "
>         >          Huei Demke
>         >
>         >            9.88
>         >            4.12
>         >
>         >         "
>         >          [1]=>
>         >          string(125) "
>         >
>         >          Jarkko Nozawa
>         >
>         >            9.88
>         >            4.12
>         >
>         >         "
>         >          [2]=>
>         >          string(125) "
>         >
>         >          Laurian Grass
>         >
>         >            9.88
>         >            4.12
>         >
>         >         "
>         >         }
>         >
>         >         It seems that a lot of the structure is lost in the
>         >         translation.  Is
>         >         there a way I can get the XML result set in PHP?
>          Does the C
>         >         API do the
>         >         same thing?  Is this even the right place to ask?  I
>         thought
>         >         some
>         >         version of the query produced a nested array, which
>         would be a
>         >         good
>         >         alternative.
>         >
>         >         -Sam
>         >
>         >
>         >
>         
> ------------------------------------------------------------------------------
>         >         Download Intel&#174; Parallel Studio Eval
>         >         Try the new software tools for yourself. Speed
>         compiling, find
>         >         bugs
>         >         proactively, and fine-tune applications for parallel
>         >         performance.
>         >         See why Intel Parallel Studio got high marks during
>         beta.
>         >         http://p.sf.net/sfu/intel-sw-dev
>         >         _______________________________________________
>         >         Sedna-discussion mailing list
>         >         [email protected]
>         >
>         https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>         >
>         
>         
> 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to