Re: segfault on xpath queries :P
emf <syncato-IT4L295iNO/[email protected]> Tue, 4 May 2004 01:30:12 -0400
| Newsgroups | gmane.comp.web.syncato.general |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-2-114714088
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
On May 4, 2004, at 02:56, darryl wrote:
> I have no idea what your problem is, BUT i think kimbro's idea of
> passing the xpath in via
> a named parameter is the way to go.
I have solved the xpath issue, and it's certainly not the apache thing:
from Weblog import Weblog
blog = Weblog('/home/roland/Syncato/config')
print blog.handleRequest('//character','','','')
That segfaults reliably. (character is an element that appears ~320
times in the six documents I have).
I would be very appreciative if you could tell me if, after copying the
documents http://mindlace.net/tmp/roland.tgz , and using the attached
config file (changing paths accordingly), running the script above (in
your dist/scripts/lib/ dir) gives you a segfault.
I really like xpath sans a named parameter - it makes it very elegant
to make xpath requests.
> I've also found that while trying to use mod_rewrite to proxy to
> another apache install
> is causing issues with item titles ending in a "?" Webware is now
> intrepreting that as a query parameter....
Well, that'll teach you to make querulous blog entries.
--
~mindlace
--Apple-Mail-2-114714088
Content-Transfer-Encoding: 7bit
Content-Type: application/x-xml;
x-unix-mode=0644;
name="config.xml"
Content-Disposition: attachment;
filename=config.xml
<?xml version="1.0"?>
<blog>
<!--
The system HTTP URL this is the base inder which everything else can be
found.
TODO: The other URLs need to be refactored to be taken relative to this one.
-->
<system-url>http://roland.mindlace.net/WK</system-url>
<!--
The base HTTP URL to the blog system.
-->
<base-url>http://roland.mindlace.net/WK/blog</base-url>
<!--
URL for the HTML administration interface.
-->
<admin-url>http://roland.mindlace.net/WK/admin</admin-url>
<!--
Base URL where static web content is found. This is for images, CSS files
and such,
-->
<content-url>http://mindlace.net/</content-url>
<title>Roland HT</title>
<description>Hypertextual analysis of Roland's Corpus</description>
<webmaster>web-IT4L295iNO/[email protected]</webmaster>
<content-owner>Vika Zafrin and Ethan Fremen</content-owner>
<copyright>2004</copyright>
<language>en-us</language>
<!--
Type of database that should be used, current options are dbxml to use
Berkeley DB XML and file to use a file system based database.
-->
<db-type>file</db-type>
<!--
The location of the database enviroment to use for all data.
-->
<!--db-location>../data/blog-data</db-location-->
<db-location>/home/roland/Syncato/data/roland</db-location>
<!--
The location where the cached files will be written
-->
<cache-location>/home/roland/Syncato/data/cache</cache-location>
<!--
Location of the user customizable XSL stylesheets
-->
<user-style-location>/home/roland/Syncato/stylesheets</user-style-location>
<!--
Location of the system default XSL stylesheets
-->
<system-style-location>/home/roland/Syncato/dist/stylesheets</system-style-location>
<!--
When a root URL request is made this style will be used unless a different
one is specified as part of the URL
-->
<style-default>front-page</style-default>
<preferred-rss>rss20</preferred-rss>
<css-style>syncato.css</css-style>
<!--
this is the name of the root element for weblog posts. The system doesn't
particularly care about the structure of the content inserted into the
database so you can use whatever structure you want as long as you define
what the root is. -->
<post-root-element>work</post-root-element>
<!--
Similar to post-root-element but for category entries. At the current time
this is not fully implemented.
-->
<category-root-element>category</category-root-element>
<!--
If set to yes pings weblogs.com and glo.gs everytime a post is
added.
-->
<ping-weblogs>no</ping-weblogs>
<!--
URLs that will be pinged. These must point to URLs that support the
weblogs.com ping interface.
-->
<ping-target>http://rpc.weblogs.com/RPC2</ping-target>
<ping-target>http://ping.blo.gs/</ping-target>
<ping-target>http://rpc.technorati.com/rpc/ping</ping-target>
<!--
If set to yes will cache the request results for future use.
-->
<cache-results>no</cache-results>
<!--
Turns thr XPath in the URL feature on or off. Set to yes to turn it on.
-->
<enable-url-queries>yes</enable-url-queries>
<!--
Turns content queries on or off. Content queries are queries applied to the
normal output result to extract just a fragment of the result. They come
through the URL as the c parameter.
-->
<enable-content-queries>yes</enable-content-queries>
<!--
Namespaces are defined to prime the query engine so that it knows how to map
prefixes in XPath queries. If you want to include namespaces in your XPath
queries you have to define them here. You can add as many namespace entries
as necessary.
-->
<namespace prefix="syncato">http://www.syncato.com/NS/syncato</namespace>
<!-- How many days worth of items to show on the frontpage -->
<frontpage-term>7</frontpage-term>
<!--
If set to yes use-blacklist will turn on blacklist checking for comments to
reduce the occurance of comment spam.
-->
<use-blacklist>no</use-blacklist>
<!--
The error message that is displayed when a comment is posted that contains
a URL that is on the blacklist. This is used to prevent comment spam.
The %s will be substituted for the URL that was denied. If you change this
message make sure you include a %s in it.
-->
<blacklist-message>The URL %s is considered an unacceptable link by this site.</blacklist-message>
<!--
If you have accounts for these you can set your ids to make including
ads simpler.
Note: If you want to help out development of this software you can leave
these alone and keep the ads on your page somewhere.
-->
<google-ad-id></google-ad-id>
<amazon-associates-id></amazon-associates-id>
</blog>
--Apple-Mail-2-114714088--
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click