text: Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
  You can subscribe to this list here.
  Showing
  13
  results of 13
  Hi Luigi,
  =20
  > I think maybe we need to think about ACLs on modules and functions,
  > referenced by QName. And I would have this one only available to the
  > admin user by default! I will take a look to see how hard this might end
  > up to be.
  Ok, I agree with your concerns. Being able to restrict access to
  functions would indeed be needed, not only with respect to potentially
  harmfull xquery functions, but also if you think about eXist's ability
  to call arbitrary Java classes from within XQuery.
  All the best,
  Wolfgang
  Hi Wolfgang,
  I hope your vacation goes well and you return refreshed.
  I think this is an example of a potentially very dangerous function to
  expose to XQuery. A really simple DOS attack would create a call that
  would overwrite dom.dbx or another eXist data file. Even a stupid
  mistake in setting a variable with the name of the file etc. could have
  unfortunate consequences. Yet, you can't set any Permissions to prevent
  writing to files in WEB-INF/data (or wherever the data is) because
  obviously eXist needs to write to those files under normal circumstances.
  I think maybe we need to think about ACLs on modules and functions,
  referenced by QName. And I would have this one only available to the
  admin user by default! I will take a look to see how hard this might end
  up to be.
  Luigi
  Wolfgang Meier wrote:
  > Hi,
  >
  >
  >>In your opinion which is the best way for writing in the filesystem the Xml
  >>file resulting from an XQuery expression made through eXist?
  >
  >
  > I actually already started to write a corresponding function yesterday
  > after somebody else asked for it. The function is called
  > util:serialize():
  >
  > util:serialize($nodes as node()*, $outputPath as xs:string,
  > $outputOptions as xs:string*) as xs:boolean?
  >
  > Usage example:
  >
  > let $hits := //SPEECH[SPEAKER="JULIET"]
  > let $outputOpts := ("encoding=UTF-8", "indent=yes")
  >,
  > In your opinion which is the best way for writing in the filesystem the X=
  ml
  > file resulting from an XQuery expression made through eXist?
  I actually already started to write a corresponding function yesterday
  after somebody else asked for it. The function is called
  util:serialize():
  util:serialize($nodes as node()*, $outputPath as xs:string,=20
  $outputOptions as xs:string*) as xs:boolean?
  Usage example:
  let $hits :=3D //SPEECH[SPEAKER=3D"JULIET"]
  let $outputOpts :=3D ("encoding=3DUTF-8", "indent=3Dyes") Wolfgang,
  Thanks for the very fast reply. It works like a breeze, you just save my
  weekend :-)
  Greetings,
  Eelco
  ----- Original Message -----
  From: "Wolfgang Meier" <wolfgangmm@...>
  To: "Eelco Laagland" <e.laagland@...>;
  <exist-open@...>
  Sent: Friday, July 01, 2005 7:29 PM
  Subject: Re: [Exist-open] XQuery and nested default namespaces
  Hi,
  > The problem is that the default element namespace is changed from
  > xmlns=""; to
  > <lom xmlns="">. The
  > default namespace for everything under the <lom> element is nested.="">
  you need to choose a different prefix. Basically, you can map an
  arbitrary new prefix to the lom namespace, e.g.:
  declare namespace lom="";;
  and use that prefix in your query:
  collection("db/Lobster")//metadata/lom:lom
  Wolfgang
  I will be leaving for a short holiday in Switzerland tomorrow and will
  thus not be able to respond to bug reports as usual. I know that some
  fellow developers who frequently answer to questions on this list are
  away as well, so please don't be disappointed if you don't get a
  response. I'll be back in on July, 9.
  Wolfgang
  Hi,
  > The problem is that the default element namespace is changed from
  > xmlns=3D""; to=20
  > <lom xmlns=3D"">. The
  > default namespace for everything under the <lom> element is nested.=20=3D"">
  you need to choose a different prefix. Basically, you can map an
  arbitrary new prefix to the lom namespace, e.g.:
  declare namespace lom=3D"";;
  and use that prefix in your query:
  collection("db/Lobster")//metadata/lom:lom
  Wolfgang
  Hi all,
  I'm a newby on XML/Query/eXist and spent several days looking for an =
  answer, but I finally decided to ask you guys for help.
  I have XML documents in the eXist db collection /db/Lobster with the =
  following structure:
  -------------------------------------------------------------------------=
  ---------------------------
  - <manifest xmlns:xsi=3D""; =
  xmlns:adlcp=3D""; =
  xmlns:xp=3D""; =
  xmlns=3D""; =
  identifier=3D"LexTestMEEWIZNoDebug" =
  xsi:schemaLocation=3D" =
  imscp_rootv1p1p2.xsd =
  imsmd_v1p2p2.xsd =
  adlcp_rootv1p2.xsd xp_v1d0.xsd" =
  version=3D"1.0">
  - <metadata>
  <schema>ADL SCORM</schema>=20
  <schemaversion>1.2</schemaversion>=20
  - <lom xmlns=3D"">
  - <general>
  - <title>
  <langstring xml:lang=3D"x-none">Demo SCORM package</langstring>=20
  -------------------------------------------------------------------------=
  ---------------------------
  The problem is that the default element namespace is changed from =
  xmlns=3D""; to
  <lom xmlns=3D"">. The default =
  namespace for everything under the <lom> element is nested.
  Question: how do I specify these nested namespaces in XQuery. I can =
  specify a default namespace with 'declare default namespace...' but =
  where and how do I indicate the for the <lom> element there's another =
  default namespace?
  -------------------------------------------------------------------------=
  ---------------------------
  xquery version "1.0";
  declare default element namespace =
  "";;
  declare namespace xsi=3D"";;
  declare namespace adlcp=3D"";;
  declare namespace xp=3D"";;
  collection("db/Lobster")//metadata/lom
  -------------------------------------------------------------------------=
  ---------------------------
  I really hope one of you give me a clue,
  Greetings from Amsterdam,
  Eelco Laagland
  Hi all
  In your opinion which is the best way for writing in the filesystem the Xml
  file resulting from an XQuery expression made through eXist?
  This should be made from the XQuery code itself. I've looked the XQuery
  functions but haven't found something useful, so the remaining options are
  the Java Binding and the creation of a custom module, tending to the first
  option, because only few code lines are required: creation of the File
  object, creation of the FileWriter object with the File object as
  parameter, calling of the write method with the text resulting from the
  query as parameter, calling of the close method.
  What do you think?
  Thank you
  Fede
  hello
  I'm trying to use the SOAP Interface from a .net (c#) client, I stuck and
  I'm a bit confused about the example in the developper manual.
  I'm not a java developper, but I think the example there doesn't use proxy
  classes, that are generated acoording to the wsdl. If you point to
  ""; you get some of the stuff
  used in the Soap example, but what about:
  -"QueryServiceLocator"
  -"getQuery"
  could somebody help me a little bit?
  thanks
  ben
  --
  5 GB Mailbox, 50 FreeSMS
  +++ GMX - die erste Adresse für Mail, Message, More +++
  We've successfully done it in C++ using Microsoft SOAP API.
  -----Original Message-----
  From: exist-open-admin@...
  [mailto:exist-open-admin@...]On Behalf Of Wolfgang
  Meier
  Sent: Thursday, June 30, 2005 10:09 AM
  To: exist-open@...
  Subject: Re: [Exist-open] Using eXist from C
  Hi,
  I have no experience with JNI, but I would probably prefer a C client =
  library=20
  that talks to the db via the XMLRPC, SOAP or REST interfaces. I remember =
  there were some messages on the list recently re using gsoap to connect =
  to=20
  eXist. See
  Wolfgang
  > Hi all,
  >
  > I've got a programme written in C that I want to
  > extend to use an eXist database (running as a web
  > application under Tomcat). I'm wondering anyone has
  > taken the trouble to write either a C client library
  > for eXist, or a JNI-style bridge to the Java library?
  >
  > If not I may well be able to rewrite the C code, but
  > I want to investigate other options first.
  >
  > All help appreciated,
  >
  > Regards,
  > Daragh
  -------------------------------------------------------
  SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
  from IBM. Find simple to follow Roadmaps, straightforward articles,
  informative Webcasts and more! Get everything you need to get up to
  speed, fast. =
  _______________________________________________
  Exist-open mailing list
  Exist-open@...
  > 2. As mentioned here on 23 May
  > document("/db/shakespeare/plays/hamlet.xml")//TITLE[15]
  > selects another TITLE than
  > document("/db/shakespeare/plays/hamlet.xml")//TITLE[position()=15]
  >
  > Michael Beddow did some analysis in his e-mail on 23 May
  Yeah, it's some kind of a funny bug. Try this:
  for $i in (1 to 32)
  let $a:=document("/db/shakespeare/plays/hamlet.xml")//TITLE[$i],
  $b:=document("/db/shakespeare/plays/hamlet.xml")//TITLE[position()=$i]
  return if ($a eq $b) then $i else ()
  It returns the numbers of the nodes which have identical values. As Michael
  mentioned, it works correct for 1-3. And for 26 and 27! You get the same results
  when you try a node identy test ($a is $b) instead of a value test.
  If you try:
  for $s in (1 to 4)
  return $s/position()
  you strangely get the numbers from 2 to 5. Is that correct?
  Jens
  Hello,
  I'm using the current CVS version and having two issues with XPaths=20
  (send to eXist via XMLRPC)
  1. using some functions on a non-existant node leads to a NPE.
  E.g.
  //fuh/name()
  //fuh/local-name()
  2. As mentioned here on 23 May=20
  document("/db/shakespeare/plays/hamlet.xml")//TITLE[15]
  selects another TITLE than
  document("/db/shakespeare/plays/hamlet.xml")//TITLE[position()=3D15]
  Michael Beddow did some analysis in his e-mail on 23 May
  Viele Gr=FC=DFe,
  Wulf.
  Hi,
  Thanks for you reply Wolfgang . It was the good direction. The getRealPath() returned null.
  The javadoc for ServletContext's getRealPath() method explicitly says :
  "... This method returns null if the servlet container cannot translate the virtual path to a real
  path for any reason (such as when the content is being made available from a .war archive)."
  So, we must extract the war file before calling getRealPath().This is simply done by calling the
  method setExtractWAR(true).
  Now the new working code is :
  Server jserver = new Server(); // Jetty Server
  jserver.addListener(":80");
  WebApplicationContext webAppCtx = jserver.addWebApplication("/exist", "/somepath/exist.war");
  webAppCtx.setExtractWAR(true); // if set to false, getRealPath will return null !
  jserver.start();
  Again, danke :-)
  Fawzi Benzemam
  -------------------------------------
  Hi,
  the EXistServlet fails to determine the correct location for
  exist.home. Normally, this setting is read from the servlet parameter
  "basedir" as a relative path, which is then passed to
  config.getServletContext().getRealPath(); This seems to return null in
  your case, but I don"t know why. You probably have to test a bit and
  tweak line 98 of src/org/exist/http/servlets/EXistServlet.java to get
  it right. Please report if you manage to find a workaround.
  Wolfgang
  > I want to embed Jetty (5.1.4) in my app and deploy eXist (1.0b2-build-1107)
  > progammatically.
  > The code below doesn"t work. Sure I"m missing something :"-(
  > Can someone Help me ?
  > Thanks
  >
  > The code is :
  > //...
  > Server jserver = new Server(); // Jetty Server
  > jserver.addListener(":80");
  > jserver.addWebApplication("/",
  > "c:\\projets\\fcol\\src\\exist.war");
  > jserver.start();
  > //...
  >
  >
  > The ouput is :
  >
  > Parse catalog: catalog
  > Default BASE: file:C:/projets/fcol/catalog
  > Catalog does not exist: file:C:/projets/fcol/catalog
  > Exception in thread "main"
  > org.mortbay.util.MultiException[java.lang.NullPointerException]
  > at
  > org.mortbay.http.HttpServer.doStart(HttpServer.java:731)
  > at org.mortbay.util.Container.start(Container.java:72)
  > at Main.main(Main.java:29)
  > java.lang.NullPointerException
  > at java.util.Hashtable.put(Hashtable.java:396)
  > at
  > java.util.Properties.setProperty(Properties.java:128)
  > at java.lang.System.setProperty(System.java:700)
  > at
  > org.exist.http.servlets.EXistServlet.init(EXistServlet.java:87)
  > at
  > org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
  > at
  > org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
  > at
  > org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:445)
  > at
  >
  org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:323)
  > at
  > org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:511)
  > at org.mortbay.util.Container.start(Container.java:72)
  > at
  > org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
  > at org.mortbay.util.Container.start(Container.java:72)
  > at Main.main(Main.java:29)
  ___________________________________________________________________________
  Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
  Téléchargez cette version sur