Yves André | 1 Jun 2009 21:49
Picon

Re: exist + xacml

...  in fact perhaps in eXist  it 's not simply possible to define an xacml  rule of a policy by using the xpath-node-match function ...
When I observe the graphical interface, I don't find any attribute of resource (among resource-category, module-category,  xacml:source-key, xacml-source-type ...) which allows to use the xpath-node-match function. For instance when I try to use the resource-id attribute in the graphical interface then the function in the MatchId is "string-equal" ...
Is it so ???

yves

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
Thomas | 2 Jun 2009 00:39
Picon
Gravatar

Security scalability and maintenance challenges

I am working on image shearing web site and I have a security scalability 
and maintenance challenge.
The site is expected to have about 25000+ users that will upload and author 
their images.

I have four main groups of users: Authors, Admin, Support and Finance.

1. Every author has full access to the his collection.
2. Admins have full access to everywhere.
3. Support has access to the images and their descriptions in the authors 
collections.
4. Finance has access to sensitive data from the authors collections.

At the moment one collection or resource belongs to one user and one group.

My first try was: the author's collection belongs to the author and the 
group is Admin . But then if I want to give access to the files I have to 
add support users to the Admin group that will compromise the finance data.

My second attempt was to create a number of special group for every author's 
collection - for example the user Peter will have a group PetersTrustedUsers 
and PetersFinance  for his collection and resources. Every user from Support 
and Finance has to be added to every author's groups.
If we have 25,000 users, we will have 50,000 groups and every member of 
every group - Admin, Support and Finance has to be added to these 50,000 
groups one by one. I am not sure if this will scale very well if members of 
Admin, Finance and Support are added and removed on regular bases.

There could be a much simple solution if the security model allows one group 
A to have other groups B, C and D as members as well, where all users from 
groups B,C and D will be treated as member of A. Then changing the members 
of groups B,C and D will be automatically propagated to the main group A.

This mechanism does not need to be recursive - group A can include only 
users from B, C and D groups and ignore the groups that are included in B, C 
and D.

What do you think about enhancing of the security model in this way?

Any other ideas?

Regards,
Thomas 

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
James Fuller | 2 Jun 2009 17:24
Picon
Gravatar

[ann] Web Clipboard using Atom/XUL with eXist as datastore

Hello all,

latest IBM developworks article on

'Implement Web cut-and-paste using Atom XML and Firefox XUL'
http://www.ibm.com/developerworks/library/x-cldexp/

uses eXist AtomPub impl as datastore.

Jim Fuller

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Mike Sokolov | 2 Jun 2009 18:12
Favicon

Re: [ann] Web Clipboard using Atom/XUL with eXist as datastore

Wondering about the default context for xpath expressions in eXist.  
When I try expressions like:

//section

I get zero results; it seems I need to precede with a collection?

collection("/my-collection")//section

does get results

can anybody explain what the thinking behind this is: what does 
//section translate into more explicitly?  Is it searching anything at all?

-Mike

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Mike Sokolov | 2 Jun 2009 18:16
Favicon

um sorry about the random subject in the previous post

It was an interesting idea, Jim - I just didn't have a question about 
the clipboard at the moment :)

Mike Sokolov wrote:
> Wondering about the default context for xpath expressions in eXist.  
> When I try expressions like:
>
> //section
>
> I get zero results; it seems I need to precede with a collection?
>
> collection("/my-collection")//section
>
> does get results
>
> can anybody explain what the thinking behind this is: what does 
> //section translate into more explicitly?  Is it searching anything at all?
>
> -Mike
>
>
>   

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
David French | 3 Jun 2009 06:12
Picon

Inline SVG to Firefox

I am exploring ways to generate SVG images from an XQUERY.
As a simple example, the browser (firefox 3) displays the expected red
circle for a .xhtml file comprising

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Test SVG Output</title>
    </head>
    <body>
        <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%"
version="1.1">
            <circle cx="100" cy="50" r="40" stroke="black"
stroke-width="2" fill="red"></circle>
        </svg>
    </body>

</html>

but this xquery below, which generates the same content  (evidenced by
view page source), results
 in a blank display

declare option exist:serialize "method=xhtml media-type=text/html";
let  $radius:=40

return

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Test SVG Output</title>
  </head>
  <body>

<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg"
 xmlns:xlink="http://www.w3.org/1999/xlink">
<circle cx="100" cy="50" r="{$radius}" stroke="black"
stroke-width="2" fill="red"/>
</svg>
  </body>
</html>

1. What obvious thing have I missed?
2. Is there a better way to generate SVG dynamically in the query?

--
David French
Decision Support Services Limited

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Peter Crowther | 3 Jun 2009 10:41

Re: Inline SVG to Firefox

> From: David French [mailto:frenchdk <at> gmail.com]

[Working example]

Hmm, no DOCTYPE, just a:

> <html xmlns="http://www.w3.org/1999/xhtml">

[Failing example]

Hmm, no DOCTYPE, just a:

> <html xmlns="http://www.w3.org/1999/xhtml">

[...]
> 1. What obvious thing have I missed?

I'm guessing that the server knows to interpret the .xhtml suffix and send an appropriate content-type
header to the client, whereas it doesn't with the dynamically generated content.  I suspect, therefore,
that Firefox is treating the content in two different ways.  Try an explicit DOCTYPE (in both!).

                - Peter

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
David French | 3 Jun 2009 10:20
Picon

Re: Inline SVG to Firefox <SOLVED>

Thanks Serge,
The order makes no difference but by examining message on the wire I
did get the hint to try

declare option exist:serialize "method=xhtml media-type=application/xhtml+xml";
which does work.
David

2009/6/3 Serge HEIDEN <Slh <at> ens-lsh.fr>:
> David,
>
> The files you produce are not exactly the same.
> Have you tried to put the "xmlns" and "xmlns:xlink"
> attributes in the second output at the beginning
> of the svg element attribute list ?
>
> Best,
> Serge
>
> ---- Original Message ----
> From: "David French" <frenchdk <at> gmail.com>
> To: <exist-open <at> lists.sourceforge.net>
> Sent: Wednesday, June 03, 2009 6:12 AM
> Subject: [Exist-open] Inline SVG to Firefox
>
>> I am exploring ways to generate SVG images from an XQUERY.
>> As a simple example, the browser (firefox 3) displays the expected red
>> circle for a .xhtml file comprising
>>
>> <html xmlns="http://www.w3.org/1999/xhtml">
>>   <head>
>>       <title>Test SVG Output</title>
>>   </head>
>>   <body>
>>       <svg xmlns="http://www.w3.org/2000/svg"
>> xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%"
>> version="1.1">
>>           <circle cx="100" cy="50" r="40" stroke="black"
>> stroke-width="2" fill="red"></circle>
>>       </svg>
>>   </body>
>>
>> </html>
>>
>> but this xquery below, which generates the same content  (evidenced by
>> view page source), results
>> in a blank display
>>
>> declare option exist:serialize "method=xhtml media-type=text/html";
>> let  $radius:=40
>>
>> return
>>
>> <html xmlns="http://www.w3.org/1999/xhtml">
>>  <head>
>>   <title>Test SVG Output</title>
>>  </head>
>>  <body>
>>
>> <svg width="100%" height="100%" version="1.1"
>> xmlns="http://www.w3.org/2000/svg"
>> xmlns:xlink="http://www.w3.org/1999/xlink">
>> <circle cx="100" cy="50" r="{$radius}" stroke="black"
>> stroke-width="2" fill="red"/>
>> </svg>
>>  </body>
>> </html>
>>
>> 1. What obvious thing have I missed?
>> 2. Is there a better way to generate SVG dynamically in the query?
>
> --
> Dr. Serge Heiden, slh <at> ens-lsh.fr, http://textometrie.ens-lsh.fr
> ENS-LSH/CNRS - ICAR UMR5191, Institut de Linguistique Française
> 15, parvis René Descartes 69342 Lyon BP7000 Cedex, tél. +33(0)622003883
>
>

--

-- 
David French
Decision Support Services Limited
email: frenchdk <at> gmail.com
Phone:+64 (0)4 233 1900
Mobile:+64 (0)21 993 142
Blog: http://davethinkingaloud.blogspot.com/

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Thomas | 3 Jun 2009 14:38
Picon
Gravatar

xdb:store-files-from-pattern skips one directory when recursive pattern is used

dev1.3, rev.9095

When a recursive patter is used in xdb:store-files-from-pattern it misses 
the first directory.
Test case: In the directory where the test.xql file is located ( the code is 
at the bottom of this email) create a file test-data.xml and copy it to the 
following directory structure:
copy-files.xql
data/test-data.xml
data/d1/test-data.xml
data/d2/test-data.xml

We want to import these  files, keeping the directory structure in the 
database under a collection /db/test  :
/db/test/test-data.xml
/db/test/d1/test-data.xml
/db/test/d2/test-data.xml

The result is:
/db/test/test-data.xml
/db/d1/test-data.xml
/db/d2/test-data.xml

copy-files.xql:
xquery version "1.0" encoding "UTF-8";
declare default function namespace "http://www.w3.org/2005/xpath-functions";
import module namespace xdb="http://exist-db.org/xquery/xmldb";
declare boundary-space strip;
declare option exist:serialize "method=xml media-type=text/xml";
let $home := system:get-exist-home()
let $pathSep := util:system-property("file.separator")
let $current-dir := replace(system:get-module-load-path(),'\\', '/')

let $dir-to-copy := 'data'
let $coll := '/db/test'
let $ping-coll := if( xdb:collection-exists ($coll)) then ()
else xdb:create-collection( '/db', 'test')

let $dir := if( contains($current-dir,':/' ) ) (: c:/eXist - windows os :)
then(
if( $dir-to-copy = '.' ) then
$current-dir
else
concat($current-dir, '/', $dir-to-copy )
)else if(ends-with($home, "WEB-INF")) then
concat(substring-before($home, "WEB-INF"), $coll, $pathSep, $dir-to-copy )
else
concat($home, $pathSep, "webapp", $pathSep, $coll, $pathSep, $dir-to-copy )

return
  element root {
  element path { $dir },
  xdb:store-files-from-pattern( $coll, $dir, '**/*.xml', 'text/xml', 
true() )
}

Regards,
Thomas 

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Wolfgang | 3 Jun 2009 15:44
Gravatar

Re: [ann] Web Clipboard using Atom/XUL with eXist as datastore

> Wondering about the default context for xpath expressions in eXist.  
> When I try expressions like:
> 
> //section
> 
> I get zero results; it seems I need to precede with a collection?

//section will be evaluated against the static context of the query and 
the documents it contains. The static context depends on how you call 
your query and which interface you use.

In most cases, eXist can figure out what the context collection should 
be. For example, if you post a query to the REST interface at 
/exist/rest/db/test, the context collection is /db/test. Likewise, if 
you use the XMLDB API from Java, the context collection is the one from 
which you obtained the XQueryService.

Wolfgang

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get

Gmane