You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(57) |
Apr
(103) |
May
(164) |
Jun
(139) |
Jul
(173) |
Aug
(196) |
Sep
(221) |
Oct
(333) |
Nov
(214) |
Dec
(88) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(163) |
Feb
(165) |
Mar
(98) |
Apr
(93) |
May
(199) |
Jun
(118) |
Jul
(200) |
Aug
(212) |
Sep
(185) |
Oct
(297) |
Nov
(437) |
Dec
(272) |
| 2006 |
Jan
(542) |
Feb
(329) |
Mar
(267) |
Apr
(332) |
May
(267) |
Jun
(130) |
Jul
(161) |
Aug
(348) |
Sep
(166) |
Oct
(305) |
Nov
(173) |
Dec
(173) |
| 2007 |
Jan
(199) |
Feb
(118) |
Mar
(133) |
Apr
(200) |
May
(208) |
Jun
(146) |
Jul
(198) |
Aug
(146) |
Sep
(187) |
Oct
(182) |
Nov
(181) |
Dec
(83) |
| 2008 |
Jan
(252) |
Feb
(124) |
Mar
(124) |
Apr
(101) |
May
(143) |
Jun
(122) |
Jul
(129) |
Aug
(60) |
Sep
(80) |
Oct
(89) |
Nov
(54) |
Dec
(112) |
| 2009 |
Jan
(88) |
Feb
(145) |
Mar
(105) |
Apr
(164) |
May
(123) |
Jun
(154) |
Jul
(374) |
Aug
(341) |
Sep
(219) |
Oct
(137) |
Nov
(373) |
Dec
(240) |
| 2010 |
Jan
(197) |
Feb
(270) |
Mar
(253) |
Apr
(150) |
May
(102) |
Jun
(51) |
Jul
(300) |
Aug
(512) |
Sep
(254) |
Oct
(258) |
Nov
(288) |
Dec
(143) |
| 2011 |
Jan
(238) |
Feb
(179) |
Mar
(253) |
Apr
(332) |
May
(248) |
Jun
(255) |
Jul
(216) |
Aug
(282) |
Sep
(146) |
Oct
(77) |
Nov
(86) |
Dec
(69) |
| 2012 |
Jan
(172) |
Feb
(234) |
Mar
(229) |
Apr
(101) |
May
(212) |
Jun
(267) |
Jul
(129) |
Aug
(210) |
Sep
(239) |
Oct
(271) |
Nov
(368) |
Dec
(220) |
| 2013 |
Jan
(179) |
Feb
(155) |
Mar
(59) |
Apr
(47) |
May
(99) |
Jun
(158) |
Jul
(185) |
Aug
(16) |
Sep
(16) |
Oct
(7) |
Nov
(20) |
Dec
(12) |
| 2014 |
Jan
(21) |
Feb
(17) |
Mar
(18) |
Apr
(13) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(22) |
Sep
(30) |
Oct
(16) |
Nov
(19) |
Dec
(16) |
| 2015 |
Jan
(14) |
Feb
(24) |
Mar
(33) |
Apr
(41) |
May
(14) |
Jun
(80) |
Jul
(53) |
Aug
(8) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(2) |
| 2016 |
Jan
(22) |
Feb
(12) |
Mar
(30) |
Apr
(6) |
May
(33) |
Jun
(16) |
Jul
(8) |
Aug
(20) |
Sep
(12) |
Oct
(18) |
Nov
(12) |
Dec
(11) |
| 2017 |
Jan
(24) |
Feb
(26) |
Mar
(47) |
Apr
(23) |
May
(19) |
Jun
(14) |
Jul
(28) |
Aug
(30) |
Sep
(17) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
(73) |
Mar
(90) |
Apr
(42) |
May
(116) |
Jun
(90) |
Jul
(127) |
Aug
(103) |
Sep
(56) |
Oct
(42) |
Nov
(95) |
Dec
(58) |
| 2020 |
Jan
(102) |
Feb
(31) |
Mar
(93) |
Apr
(60) |
May
(57) |
Jun
(45) |
Jul
(29) |
Aug
(32) |
Sep
(44) |
Oct
(86) |
Nov
(51) |
Dec
(71) |
| 2021 |
Jan
(44) |
Feb
(25) |
Mar
(78) |
Apr
(130) |
May
(64) |
Jun
(74) |
Jul
(21) |
Aug
(64) |
Sep
(40) |
Oct
(43) |
Nov
(21) |
Dec
(99) |
| 2022 |
Jan
(154) |
Feb
(64) |
Mar
(45) |
Apr
(95) |
May
(62) |
Jun
(48) |
Jul
(73) |
Aug
(37) |
Sep
(71) |
Oct
(27) |
Nov
(40) |
Dec
(65) |
| 2023 |
Jan
(89) |
Feb
(130) |
Mar
(124) |
Apr
(50) |
May
(93) |
Jun
(46) |
Jul
(45) |
Aug
(68) |
Sep
(62) |
Oct
(71) |
Nov
(108) |
Dec
(82) |
| 2024 |
Jan
(53) |
Feb
(76) |
Mar
(64) |
Apr
(75) |
May
(36) |
Jun
(54) |
Jul
(98) |
Aug
(137) |
Sep
(58) |
Oct
(177) |
Nov
(84) |
Dec
(52) |
| 2025 |
Jan
(70) |
Feb
(53) |
Mar
(72) |
Apr
(47) |
May
(88) |
Jun
(49) |
Jul
(86) |
Aug
(51) |
Sep
(65) |
Oct
(91) |
Nov
(18) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(7) |
2
(2) |
3
(10) |
4
(17) |
|
5
(11) |
6
(10) |
7
(1) |
8
(21) |
9
(4) |
10
(2) |
11
(2) |
|
12
(9) |
13
(11) |
14
(8) |
15
(10) |
16
(10) |
17
(7) |
18
(10) |
|
19
(14) |
20
(9) |
21
(4) |
22
(7) |
23
(12) |
24
(6) |
25
(8) |
|
26
(12) |
27
(5) |
28
(6) |
29
(11) |
30
(8) |
31
(13) |
|
|
From: <br...@us...> - 2006-03-31 22:49:58
|
Revision: 3027 Author: brihaye Date: 2006-03-31 14:49:49 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3027&view=rev Log Message: ----------- Attempted a fix to check function parameter type. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/DynamicNameCheck.java Modified: trunk/eXist-1.0/src/org/exist/xquery/DynamicNameCheck.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/DynamicNameCheck.java 2006-03-31 22:22:20 UTC (rev 3026) +++ trunk/eXist-1.0/src/org/exist/xquery/DynamicNameCheck.java 2006-03-31 22:49:49 UTC (rev 3027) @@ -23,6 +23,7 @@ package org.exist.xquery; import org.exist.dom.DocumentSet; +import org.exist.dom.NodeProxy; import org.exist.xquery.util.ExpressionDumper; import org.exist.xquery.value.Item; import org.exist.xquery.value.NodeValue; @@ -68,6 +69,10 @@ //Should we get a kind of Type.UNKNOWN rather than Type.NODE ? if (itemType == Type.NODE) itemType = seq.getItemType(); + //Last chance... + if (itemType == Type.NODE) + if (item instanceof NodeProxy) + itemType = ((NodeProxy)item).getNode().getNodeType(); if(!Type.subTypeOf(itemType, test.getType())) { throw new XPathException(expression.getASTNode(), "Type error in expression" + ": required type is " + Type.getTypeName(test.getType()) + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 22:22:27
|
Revision: 3026 Author: brihaye Date: 2006-03-31 14:22:20 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3026&view=rev Log Message: ----------- Fixed incorrect optimization of logical expressions. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/LogicalOp.java trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java Modified: trunk/eXist-1.0/src/org/exist/xquery/LogicalOp.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/LogicalOp.java 2006-03-31 22:06:51 UTC (rev 3025) +++ trunk/eXist-1.0/src/org/exist/xquery/LogicalOp.java 2006-03-31 22:22:20 UTC (rev 3026) @@ -67,7 +67,7 @@ (getLeft().getDependencies() & Dependency.CONTEXT_ITEM) == 0 && (getRight().getDependencies() & Dependency.CONTEXT_ITEM) == 0 //TODO: is this accurate ? -pb - && contextInfo.getContextId() != -1) + /*&& contextInfo.getContextId() != -1*/) optimize = true; else optimize = false; Modified: trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java 2006-03-31 22:06:51 UTC (rev 3025) +++ trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java 2006-03-31 22:22:20 UTC (rev 3026) @@ -773,8 +773,15 @@ + "return $t//a[s='Z' and ./preceding-sibling::*[1]/s='B']"; result = queryResource(service, "numbers.xml", query, 1); assertXMLEqual("<a><s>Z</s> 4 </a>", result.getResource(0) - .getContent().toString()); + .getContent().toString()); + query = "let $doc := <doc><rec n='1'><a>first</a><b>second</b></rec>" + + "<rec n='2'><a>first</a><b>third</b></rec></doc> " + + "return $doc//rec[fn:not(b = 'second') and (./a = 'first')]"; + result = queryResource(service, "numbers.xml", query, 1); + assertXMLEqual("<rec n=\"2\"><a>first</a><b>third</b></rec>", result.getResource(0) + .getContent().toString()); + } catch (XMLDBException e) { fail(e.getMessage()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <di...@us...> - 2006-03-31 22:06:59
|
Revision: 3025 Author: dizzzz Date: 2006-03-31 14:06:51 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3025&view=rev Log Message: ----------- Upload binary file from MSword2003 via webDAV made the PUT.java spin around eternally. this is fixed right now. Files are still not stored completely, relation with null resource locking. TBC Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/http/webdav/methods/Put.java Modified: trunk/eXist-1.0/src/org/exist/http/webdav/methods/Put.java =================================================================== --- trunk/eXist-1.0/src/org/exist/http/webdav/methods/Put.java 2006-03-31 22:00:06 UTC (rev 3024) +++ trunk/eXist-1.0/src/org/exist/http/webdav/methods/Put.java 2006-03-31 22:06:51 UTC (rev 3025) @@ -71,12 +71,12 @@ HttpServletResponse response, String path) throws ServletException, IOException { LOG.debug("PUT start"); File tempFile = saveRequestContent(request); - + String url = tempFile.toURI().toASCIIString(); String contentType = request.getContentType(); DBBroker broker = null; Collection collection = null; - + boolean collectionLocked = true; TransactionManager transact = pool.getTransactionManager(); Txn txn = transact.beginTransaction(); @@ -115,7 +115,7 @@ // if (mime == null){ // mime = MimeType.BINARY_TYPE; // } - + // TODO why is content type involved here? would not like to use it, // as it seems to block binary file upload by MS office. @@ -213,6 +213,7 @@ response.setStatus(HttpServletResponse.SC_CREATED); } + private File saveRequestContent(HttpServletRequest request) throws IOException { ServletInputStream is = request.getInputStream(); int len = request.getContentLength(); @@ -220,15 +221,19 @@ // to a temporary file first. File tempFile = File.createTempFile("existSRC", ".tmp"); OutputStream os = new FileOutputStream(tempFile); - byte[] buffer = new byte[4096]; - int count, l = 0; - do { - count = is.read(buffer); - if (count > 0) - os.write(buffer, 0, count); - l += count; - } while (l < len); - os.close(); + + if(len!=0){ + byte[] buffer = new byte[4096]; + int count, l = 0; + do { + count = is.read(buffer); + if (count > 0) + os.write(buffer, 0, count); + l += count; + } while (l < len); + os.close(); + } + return tempFile; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <di...@us...> - 2006-03-31 22:00:13
|
Revision: 3024 Author: dizzzz Date: 2006-03-31 14:00:06 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3024&view=rev Log Message: ----------- Added another test Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java Modified: trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java 2006-03-31 21:44:28 UTC (rev 3023) +++ trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java 2006-03-31 22:00:06 UTC (rev 3024) @@ -258,6 +258,25 @@ } public void testElements15() { + + String query ="let $funSpecs :="+ + "<FunctionSpecifications>"+ + "<FunctionName>Func2</FunctionName>"+ + "</FunctionSpecifications>"+ + "let $funVers1 :="+ + "<FunctionVerifications>"+ + "<FunctionName>Func2</FunctionName>"+ + "</FunctionVerifications>"+ + "let $funVers2 :="+ + "<FunctionVerifications>"+ + "{$funSpecs/FunctionName}"+ + "</FunctionVerifications>"+ + "return "+ + "deep-equal($funVers1, $funVers2)"; + assertQuery(true, query); + } + + public void testElements16() { // [ 1462061 ] Issue with deep-equal() "DeepestEqualBug" String query = "declare namespace ve = \"ournamespace\";"+ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <di...@us...> - 2006-03-31 21:44:34
|
Revision: 3023 Author: dizzzz Date: 2006-03-31 13:44:28 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3023&view=rev Log Message: ----------- Added "DeepestEqualBug" test Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java Modified: trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java 2006-03-31 21:01:21 UTC (rev 3022) +++ trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java 2006-03-31 21:44:28 UTC (rev 3023) @@ -256,6 +256,24 @@ " )"; assertQuery(true, query); } + + public void testElements15() { + // [ 1462061 ] Issue with deep-equal() "DeepestEqualBug" + String query = + "declare namespace ve = \"ournamespace\";"+ + "declare function ve:functionVerifications($pars as element()*) as element() {"+ + "<FunctionVerifications>"+ + "<ParameterVerifications>{$pars[Name eq \"Par1\"]}</ParameterVerifications>"+ + "</FunctionVerifications>"+ + "};"+ + "let $par1 := <Parameter><Name>Par1</Name></Parameter>"+ + "let $funVers2 := "+ + "<FunctionVerifications><ParameterVerifications> {$par1}"+ + "</ParameterVerifications></FunctionVerifications> "+ + "return "+ + "deep-equal($funVers2, ve:functionVerifications($par1))"; + assertQuery(true,query); + } public void testNSElements1() { createDocument("test", "<test xmlns:p='urn:foo' xmlns:q='urn:foo'><p:a/><q:a/></test>"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 21:01:29
|
Revision: 3022 Author: brihaye Date: 2006-03-31 13:01:21 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3022&view=rev Log Message: ----------- Another fix in deep-equal(). Reference's node type can only be determined with certainity when the persistent node has been actually retrieved. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java Modified: trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-31 19:48:20 UTC (rev 3021) +++ trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-31 21:01:21 UTC (rev 3022) @@ -23,7 +23,6 @@ package org.exist.memtree; import org.exist.dom.DocumentSet; -import org.exist.dom.NodeListImpl; import org.exist.dom.NodeSet; import org.exist.dom.QName; import org.exist.dom.QNameable; Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java 2006-03-31 19:48:20 UTC (rev 3021) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java 2006-03-31 21:01:21 UTC (rev 3022) @@ -174,15 +174,17 @@ while(!(a == null || b == null)) { int nodeTypeA = a.getNodeType(); if (nodeTypeA == NodeImpl.REFERENCE_NODE) { - //Retrieve the actual node type - NodeProxy p = ((ReferenceNode)a).getReference(); - nodeTypeA = p.getNodeType(); + //Dereference... + NodeProxy p = ((ReferenceNode)a).getReference(); + //... then retrieve the actual node, then its type + nodeTypeA = p.getNode().getNodeType(); } int nodeTypeB = b.getNodeType(); if (nodeTypeB == NodeImpl.REFERENCE_NODE) { - //Retrieve the actual node type - NodeProxy p = ((ReferenceNode)b).getReference(); - nodeTypeB = p.getNodeType(); + //Dereference... + NodeProxy p = ((ReferenceNode)b).getReference(); + //... then retrieve the actual node, then its type + nodeTypeB = p.getNode().getNodeType(); } if (nodeTypeA != nodeTypeB) return false; switch(nodeTypeA) { @@ -206,9 +208,10 @@ return null; int nodeType = n.getNodeType(); if (nodeType == NodeImpl.REFERENCE_NODE) { - //Retrieve the actual node type + //Dereference... NodeProxy p = ((ReferenceNode)n).getReference(); - nodeType = p.getNodeType(); + //... then retrieve the actual node, then its type + nodeType = p.getNode().getNodeType(); } while (!(nodeType == Node.ELEMENT_NODE || nodeType == Node.TEXT_NODE)) { n = n.getNextSibling(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 19:48:30
|
Revision: 3021 Author: brihaye Date: 2006-03-31 11:48:20 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3021&view=rev Log Message: ----------- Added exceptions in NodeImpl Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java Modified: trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-31 18:30:30 UTC (rev 3020) +++ trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-31 19:48:20 UTC (rev 3021) @@ -76,7 +76,6 @@ public int getImplementationType() { return NodeValue.IN_MEMORY_NODE; } - /* (non-Javadoc) * @see org.exist.xquery.value.Sequence#getDocumentSet() @@ -151,14 +150,14 @@ * @see org.w3c.dom.Node#getNodeValue() */ public String getNodeValue() throws DOMException { - return null; + throw new RuntimeException("Can not call getNodeValue() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#setNodeValue(java.lang.String) */ public void setNodeValue(String arg0) throws DOMException { - // TODO Auto-generated method stub + throw new RuntimeException("Can not call setNodeValue() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -182,6 +181,7 @@ } public void addContextNode(int contextId, NodeValue node) { + throw new RuntimeException("Can not call addContextNode() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -295,8 +295,7 @@ * @see org.w3c.dom.Node#insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) */ public Node insertBefore(Node arg0, Node arg1) throws DOMException { - // TODO Auto-generated method stub - return null; + throw new RuntimeException("Can not call insertBefore() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -345,8 +344,7 @@ * @see org.w3c.dom.Node#isSupported(java.lang.String, java.lang.String) */ public boolean isSupported(String arg0, String arg1) { - // TODO Auto-generated method stub - return false; + throw new RuntimeException("Can not call isSupported() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -455,7 +453,6 @@ */ public AtomicValue atomize() throws XPathException { return new UntypedAtomicValue(getStringValue()); - //return new StringValue(getStringValue()); } /* @@ -466,12 +463,14 @@ * @see org.exist.xquery.value.Sequence#add(org.exist.xquery.value.Item) */ public void add(Item item) throws XPathException { - } + throw new RuntimeException("Can not call add() on node type " + this.getNodeType()); + } /* (non-Javadoc) * @see org.exist.xquery.value.Sequence#addAll(org.exist.xquery.value.Sequence) */ public void addAll(Sequence other) throws XPathException { + throw new RuntimeException("Can not call addAll() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -521,6 +520,7 @@ * @see org.exist.xquery.value.Sequence#effectiveBooleanValue() */ public boolean effectiveBooleanValue() throws XPathException { + //A node evaluates to true() return true; } @@ -640,6 +640,7 @@ * @see org.exist.xquery.value.Sequence#setSelfAsContext(int) */ public void setSelfAsContext(int contextId) { + throw new RuntimeException("Can not call setSelfAsContext() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -655,6 +656,7 @@ */ public void setIsCached(boolean cached) { // ignore + throw new RuntimeException("Can not call setIsCached() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -667,95 +669,85 @@ /** ? @see org.w3c.dom.Node#getBaseURI() */ public String getBaseURI() { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call getBaseURI() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) */ public short compareDocumentPosition(Node other) throws DOMException { - // maybe TODO - new DOM interfaces - Java 5.0 - return 0; + throw new RuntimeException("Can not call compareDocumentPosition() on node type " + this.getNodeType()); + //return 0; } /** ? @see org.w3c.dom.Node#getTextContent() */ public String getTextContent() throws DOMException { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call getTextContent() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#setTextContent(java.lang.String) */ public void setTextContent(String textContent) throws DOMException { - // maybe TODO - new DOM interfaces - Java 5.0 - + throw new RuntimeException("Can not call setTextContent() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node) */ public boolean isSameNode(Node other) { - // maybe TODO - new DOM interfaces - Java 5.0 - return false; + throw new RuntimeException("Can not call isSameNode() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#lookupPrefix(java.lang.String) */ public String lookupPrefix(String namespaceURI) { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call lookupPrefix() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String) */ public boolean isDefaultNamespace(String namespaceURI) { - // maybe TODO - new DOM interfaces - Java 5.0 - return false; + throw new RuntimeException("Can not call isDefaultNamespace() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String) */ public String lookupNamespaceURI(String prefix) { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call lookupNamespaceURI() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node) */ public boolean isEqualNode(Node arg) { - // maybe TODO - new DOM interfaces - Java 5.0 - return false; + throw new RuntimeException("Can not call isEqualNode() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String) */ public Object getFeature(String feature, String version) { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call getFeature() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler) */ public Object setUserData(String key, Object data, UserDataHandler handler) { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call setUserData() on node type " + this.getNodeType()); } /** ? @see org.w3c.dom.Node#getUserData(java.lang.String) */ public Object getUserData(String key) { - // maybe TODO - new DOM interfaces - Java 5.0 - return null; + throw new RuntimeException("Can not call getUserData() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.exist.xquery.value.Sequence#isPersistentSet() */ public boolean isPersistentSet() { + //See package's name ;-) return false; } public void clearContext(int contextId) { - // ignored for in-memory nodes + throw new RuntimeException("Can not call clearContext() on node type " + this.getNodeType()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 18:30:36
|
Revision: 3020 Author: brihaye Date: 2006-03-31 10:30:30 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3020&view=rev Log Message: ----------- Removed default values Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/dom/NodeImpl.java Modified: trunk/eXist-1.0/src/org/exist/dom/NodeImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/dom/NodeImpl.java 2006-03-31 18:30:08 UTC (rev 3019) +++ trunk/eXist-1.0/src/org/exist/dom/NodeImpl.java 2006-03-31 18:30:30 UTC (rev 3020) @@ -276,11 +276,11 @@ */ public String getPrefix() { QName nodeName = getQName(); - if (nodeName != null) { + //if (nodeName != null) { final String prefix = nodeName.getPrefix(); return prefix == null ? "" : prefix; - } - return ""; + //} + //return ""; } /** @@ -298,31 +298,34 @@ /** * @see org.w3c.dom.Node#getNamespaceURI() */ + //TODO : remove default value public String getNamespaceURI() { QName nodeName = getQName(); - if (nodeName != null) + //if (nodeName != null) return nodeName.getNamespaceURI(); - return ""; + //return ""; } /** * @see org.w3c.dom.Node#getLocalName() */ + //TODO : remove default value public String getLocalName() { QName nodeName = getQName(); - if (nodeName != null) + //if (nodeName != null) return nodeName.getLocalName(); - return ""; + //return ""; } /** * @see org.w3c.dom.Node#getNodeName() */ + //TODO : remove default value public String getNodeName() { QName nodeName = getQName(); - if(nodeName != null) + //if(nodeName != null) return nodeName.toString(); - return ""; + //return ""; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 18:30:14
|
Revision: 3019 Author: brihaye Date: 2006-03-31 10:30:08 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3019&view=rev Log Message: ----------- Added exceptions in NodeImpl Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java Modified: trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-31 18:24:48 UTC (rev 3018) +++ trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-31 18:30:08 UTC (rev 3019) @@ -239,30 +239,30 @@ * @see org.w3c.dom.Node#getChildNodes() */ public NodeList getChildNodes() { - return new NodeListImpl(); + throw new RuntimeException("Can not call getChildNodes() on node type " + this.getNodeType()); + //return new NodeListImpl(); } /* (non-Javadoc) * @see org.w3c.dom.Node#getFirstChild() */ public Node getFirstChild() { - //TODO : make abstract -pb - throw new RuntimeException("Can not call getFirstChild() from here"); + throw new RuntimeException("Can not call getFirstChild() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#getLastChild() */ public Node getLastChild() { - return null; + throw new RuntimeException("Can not call getLastChild() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#getPreviousSibling() */ public Node getPreviousSibling() { - // TODO Auto-generated method stub - return null; + //TODO : we have a getNextSibling() method ! + throw new RuntimeException("Can not call getPreviousSibling() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -277,8 +277,7 @@ * @see org.w3c.dom.Node#getAttributes() */ public NamedNodeMap getAttributes() { - //TODO : make abstract -pb - throw new RuntimeException("Can not call getAttributes() from here"); + throw new RuntimeException("Can not call getAttributes() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -304,47 +303,42 @@ * @see org.w3c.dom.Node#replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) */ public Node replaceChild(Node arg0, Node arg1) throws DOMException { - // TODO Auto-generated method stub - return null; - } + throw new RuntimeException("Can not call replaceChild() on node type " + this.getNodeType()); + } /* (non-Javadoc) * @see org.w3c.dom.Node#removeChild(org.w3c.dom.Node) */ public Node removeChild(Node arg0) throws DOMException { - // TODO Auto-generated method stub - return null; - } + throw new RuntimeException("Can not call removeChild() on node type " + this.getNodeType()); + } /* (non-Javadoc) * @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node) */ public Node appendChild(Node arg0) throws DOMException { - // TODO Auto-generated method stub - return null; - } + throw new RuntimeException("Can not call appendChild() on node type " + this.getNodeType()); + } /* (non-Javadoc) * @see org.w3c.dom.Node#hasChildNodes() */ public boolean hasChildNodes() { - return false; + throw new RuntimeException("Can not call hasChildNodes() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#cloneNode(boolean) */ public Node cloneNode(boolean arg0) { - // TODO Auto-generated method stub - return null; + throw new RuntimeException("Can not call cloneNode() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#normalize() */ public void normalize() { - // TODO Auto-generated method stub - + throw new RuntimeException("Can not call normalize() on node type " + this.getNodeType()); } /* (non-Javadoc) @@ -359,36 +353,35 @@ * @see org.w3c.dom.Node#getNamespaceURI() */ public String getNamespaceURI() { - return ""; + throw new RuntimeException("Can not call getNamespaceURI() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#getPrefix() */ public String getPrefix() { - return ""; + throw new RuntimeException("Can not call getPrefix() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#setPrefix(java.lang.String) */ public void setPrefix(String arg0) throws DOMException { - + throw new RuntimeException("Can not call setPrefix() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#getLocalName() */ public String getLocalName() { - //TODO : make abstract -pb - throw new RuntimeException("Can not call getLocalName() from here"); + throw new RuntimeException("Can not call getLocalName() on node type " + this.getNodeType()); } /* (non-Javadoc) * @see org.w3c.dom.Node#hasAttributes() */ public boolean hasAttributes() { - return false; + throw new RuntimeException("Can not call hasAttributes() on node type " + this.getNodeType()); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-03-31 18:25:00
|
Revision: 3018 Author: wolfgang_m Date: 2006-03-31 10:24:48 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3018&view=rev Log Message: ----------- AttributeImpl did not implement getFirstChild, so an exception was thrown during serialization. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/memtree/AttributeImpl.java Modified: trunk/eXist-1.0/src/org/exist/memtree/AttributeImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/AttributeImpl.java 2006-03-31 11:16:23 UTC (rev 3017) +++ trunk/eXist-1.0/src/org/exist/memtree/AttributeImpl.java 2006-03-31 18:24:48 UTC (rev 3018) @@ -96,6 +96,10 @@ return getQName().getPrefix(); } + public Node getFirstChild() { + return null; + } + /* (non-Javadoc) * @see org.w3c.dom.Attr#getSpecified() */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <del...@us...> - 2006-03-31 11:16:35
|
Revision: 3017 Author: deliriumsky Date: 2006-03-31 03:16:23 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3017&view=rev Log Message: ----------- Use constant instead of named context variable Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/update/Delete.java trunk/eXist-1.0/src/org/exist/xquery/update/Insert.java trunk/eXist-1.0/src/org/exist/xquery/update/Rename.java trunk/eXist-1.0/src/org/exist/xquery/update/Replace.java trunk/eXist-1.0/src/org/exist/xquery/update/Update.java Modified: trunk/eXist-1.0/src/org/exist/xquery/update/Delete.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/update/Delete.java 2006-03-31 10:24:52 UTC (rev 3016) +++ trunk/eXist-1.0/src/org/exist/xquery/update/Delete.java 2006-03-31 11:16:23 UTC (rev 3017) @@ -92,11 +92,11 @@ */ if (!Type.subTypeOf(inSeq.getItemType(), Type.NODE)) { - //Indicate the failure to perform this update by adding it to the sequence in the context variable "_eXist_xquery_update_error" + //Indicate the failure to perform this update by adding it to the sequence in the context variable XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR ValueSequence prevUpdateErrors = null; XPathException xpe = new XPathException(getASTNode(), Messages.getMessage(Error.UPDATE_SELECT_TYPE)); - Object ctxVarObj = context.getXQueryContextVar("_eXist_xquery_update_error"); + Object ctxVarObj = context.getXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR); if(ctxVarObj == null) { prevUpdateErrors = new ValueSequence(); @@ -106,7 +106,7 @@ prevUpdateErrors = (ValueSequence)XPathUtil.javaObjectToXPath(ctxVarObj, context); } prevUpdateErrors.add(new StringValue(xpe.getMessage())); - context.setXQueryContextVar("_eXist_xquery_update_error", prevUpdateErrors); + context.setXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR, prevUpdateErrors); if(inSeq.getLength() > 0) throw xpe; //TODO: should we trap this instead of throwing an exception - deliriumsky? Modified: trunk/eXist-1.0/src/org/exist/xquery/update/Insert.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/update/Insert.java 2006-03-31 10:24:52 UTC (rev 3016) +++ trunk/eXist-1.0/src/org/exist/xquery/update/Insert.java 2006-03-31 11:16:23 UTC (rev 3017) @@ -107,11 +107,11 @@ */ if (!Type.subTypeOf(inSeq.getItemType(), Type.NODE)) { - //Indicate the failure to perform this update by adding it to the sequence in the context variable "_eXist_xquery_update_error" + //Indicate the failure to perform this update by adding it to the sequence in the context variable XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR ValueSequence prevUpdateErrors = null; XPathException xpe = new XPathException(getASTNode(), Messages.getMessage(Error.UPDATE_SELECT_TYPE)); - Object ctxVarObj = context.getXQueryContextVar("_eXist_xquery_update_error"); + Object ctxVarObj = context.getXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR); if(ctxVarObj == null) { prevUpdateErrors = new ValueSequence(); @@ -121,7 +121,7 @@ prevUpdateErrors = (ValueSequence)XPathUtil.javaObjectToXPath(ctxVarObj, context); } prevUpdateErrors.add(new StringValue(xpe.getMessage())); - context.setXQueryContextVar("_eXist_xquery_update_error", prevUpdateErrors); + context.setXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR, prevUpdateErrors); if(inSeq.getLength() > 0) throw xpe; //TODO: should we trap this instead of throwing an exception - deliriumsky? Modified: trunk/eXist-1.0/src/org/exist/xquery/update/Rename.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/update/Rename.java 2006-03-31 10:24:52 UTC (rev 3016) +++ trunk/eXist-1.0/src/org/exist/xquery/update/Rename.java 2006-03-31 11:16:23 UTC (rev 3017) @@ -100,11 +100,11 @@ */ if (!Type.subTypeOf(inSeq.getItemType(), Type.NODE)) { - //Indicate the failure to perform this update by adding it to the sequence in the context variable "_eXist_xquery_update_error" + //Indicate the failure to perform this update by adding it to the sequence in the context variable XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR ValueSequence prevUpdateErrors = null; XPathException xpe = new XPathException(getASTNode(), Messages.getMessage(Error.UPDATE_SELECT_TYPE)); - Object ctxVarObj = context.getXQueryContextVar("_eXist_xquery_update_error"); + Object ctxVarObj = context.getXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR); if(ctxVarObj == null) { prevUpdateErrors = new ValueSequence(); @@ -114,7 +114,7 @@ prevUpdateErrors = (ValueSequence)XPathUtil.javaObjectToXPath(ctxVarObj, context); } prevUpdateErrors.add(new StringValue(xpe.getMessage())); - context.setXQueryContextVar("_eXist_xquery_update_error", prevUpdateErrors); + context.setXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR, prevUpdateErrors); if(inSeq.getLength() > 0) throw xpe; //TODO: should we trap this instead of throwing an exception - deliriumsky? Modified: trunk/eXist-1.0/src/org/exist/xquery/update/Replace.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/update/Replace.java 2006-03-31 10:24:52 UTC (rev 3016) +++ trunk/eXist-1.0/src/org/exist/xquery/update/Replace.java 2006-03-31 11:16:23 UTC (rev 3017) @@ -95,11 +95,11 @@ */ if (!Type.subTypeOf(inSeq.getItemType(), Type.NODE)) { - //Indicate the failure to perform this update by adding it to the sequence in the context variable "_eXist_xquery_update_error" + //Indicate the failure to perform this update by adding it to the sequence in the context variable XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR ValueSequence prevUpdateErrors = null; XPathException xpe = new XPathException(getASTNode(), Messages.getMessage(Error.UPDATE_SELECT_TYPE)); - Object ctxVarObj = context.getXQueryContextVar("_eXist_xquery_update_error"); + Object ctxVarObj = context.getXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR); if(ctxVarObj == null) { prevUpdateErrors = new ValueSequence(); @@ -109,7 +109,7 @@ prevUpdateErrors = (ValueSequence)XPathUtil.javaObjectToXPath(ctxVarObj, context); } prevUpdateErrors.add(new StringValue(xpe.getMessage())); - context.setXQueryContextVar("_eXist_xquery_update_error", prevUpdateErrors); + context.setXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR, prevUpdateErrors); if(inSeq.getLength() > 0) throw xpe; //TODO: should we trap this instead of throwing an exception - deliriumsky? Modified: trunk/eXist-1.0/src/org/exist/xquery/update/Update.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/update/Update.java 2006-03-31 10:24:52 UTC (rev 3016) +++ trunk/eXist-1.0/src/org/exist/xquery/update/Update.java 2006-03-31 11:16:23 UTC (rev 3017) @@ -96,11 +96,11 @@ */ if (!Type.subTypeOf(inSeq.getItemType(), Type.NODE)) { - //Indicate the failure to perform this update by adding it to the sequence in the context variable "_eXist_xquery_update_error" + //Indicate the failure to perform this update by adding it to the sequence in the context variable XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR ValueSequence prevUpdateErrors = null; XPathException xpe = new XPathException(getASTNode(), Messages.getMessage(Error.UPDATE_SELECT_TYPE)); - Object ctxVarObj = context.getXQueryContextVar("_eXist_xquery_update_error"); + Object ctxVarObj = context.getXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR); if(ctxVarObj == null) { prevUpdateErrors = new ValueSequence(); @@ -110,7 +110,7 @@ prevUpdateErrors = (ValueSequence)XPathUtil.javaObjectToXPath(ctxVarObj, context); } prevUpdateErrors.add(new StringValue(xpe.getMessage())); - context.setXQueryContextVar("_eXist_xquery_update_error", prevUpdateErrors); + context.setXQueryContextVar(XQueryContext.XQUERY_CONTEXTVAR_XQUERY_UPDATE_ERROR, prevUpdateErrors); if(inSeq.getLength() > 0) throw xpe; //TODO: should we trap this instead of throwing an exception - deliriumsky? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 10:25:04
|
Revision: 3016 Author: brihaye Date: 2006-03-31 02:24:52 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3016&view=rev Log Message: ----------- Refactored previous commit. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-31 09:45:48 UTC (rev 3015) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-31 10:24:52 UTC (rev 3016) @@ -156,8 +156,8 @@ // left expression returns node set if (Type.subTypeOf(getLeft().returnsType(), Type.NODE) && // and does not depend on the context item - (leftDeps & Dependency.CONTEXT_ITEM) == 0 && - (!inWhereClause || (leftDeps & Dependency.CONTEXT_VARS) == 0)) + !Dependency.dependsOn(leftDeps, Dependency.CONTEXT_ITEM) && + (!inWhereClause || !Dependency.dependsOn(leftDeps, Dependency.CONTEXT_VARS))) { return Dependency.CONTEXT_SET; } else { @@ -198,8 +198,8 @@ contextSequence = contextItem.toSequence(); - if (getRight().getDependencies() != Dependency.NO_DEPENDENCY && - !Dependency.dependsOn(getRight().getDependencies(), Dependency.CONTEXT_ITEM)) + if (!Dependency.dependsOn(getRight().getDependencies(), Dependency.CONTEXT_ITEM) && + Type.subTypeOf(getRight().returnsType(), Type.NODE)) { if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "quickNodeSetCompare"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-31 09:46:25
|
Revision: 3015 Author: brihaye Date: 2006-03-31 01:45:48 -0800 (Fri, 31 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3015&view=rev Log Message: ----------- Fixed wrong optimization bug in general comparison where the right argument was an atomic value. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-30 22:23:10 UTC (rev 3014) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-31 09:45:48 UTC (rev 3015) @@ -130,7 +130,7 @@ inWhereClause = (contextInfo.getFlags() & IN_WHERE_CLAUSE) != 0; //Ugly workaround for the polysemy of "." which is expanded as self::node() even when it is not relevant // (1)[.= 1] works... - invalidNodeEvaluation = getLeft() instanceof LocationStep && ((LocationStep)getLeft()).axis == Constants.SELF_AXIS; + invalidNodeEvaluation = getLeft() instanceof LocationStep && ((LocationStep)getLeft()).axis == Constants.SELF_AXIS; } /* (non-Javadoc) @@ -191,24 +191,15 @@ */ if (inPredicate && !invalidNodeEvaluation) { - if (!(Dependency.dependsOn(getDependencies(), Dependency.CONTEXT_ITEM))&& + if (!(Dependency.dependsOn(getDependencies(), Dependency.CONTEXT_ITEM)) && Type.subTypeOf(getLeft().returnsType(), Type.NODE)) { if(contextItem != null) contextSequence = contextItem.toSequence(); - /* - * TODO quickNodeSetCompare() is NOT being called for xqueries like - - * collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = current-dateTime()] - * collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = ("2005-12-20T16:39:00" cast as xs:dateTime)] - * but is being called for xqueries like - - * collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = "2005-12-20T16:39:00"] - * collection("/db/CommunityDirectory/data")/communitygroup[validation/lastapproved/date = "2005-12-20T16:39:00" cast as xs:dateTime] - * - but due to the string type of the key falls back to nodeSetCompare() - * - * deliriumsky - */ - if ((getRight().getDependencies() & Dependency.CONTEXT_ITEM) == 0 /*&& (getRight().getCardinality() & Cardinality.MANY) == 0*/) //changed to allow multiple right cardinality into () - deliriumsky + + if (getRight().getDependencies() != Dependency.NO_DEPENDENCY && + !Dependency.dependsOn(getRight().getDependencies(), Dependency.CONTEXT_ITEM)) { if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "quickNodeSetCompare"); @@ -223,6 +214,7 @@ } } + //TODO : better design. Should a (buggy) null previous result be returned, we would evaluate this ! if(result == null) { if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 22:23:19
|
Revision: 3014 Author: brihaye Date: 2006-03-30 14:23:10 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3014&view=rev Log Message: ----------- I can't really figure out why, but test suite is happy now :-) Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/util/serializer/DOMStreamer.java Modified: trunk/eXist-1.0/src/org/exist/util/serializer/DOMStreamer.java =================================================================== --- trunk/eXist-1.0/src/org/exist/util/serializer/DOMStreamer.java 2006-03-30 21:44:32 UTC (rev 3013) +++ trunk/eXist-1.0/src/org/exist/util/serializer/DOMStreamer.java 2006-03-30 22:23:10 UTC (rev 3014) @@ -28,6 +28,7 @@ import java.util.Stack; import org.exist.dom.QName; +import org.exist.memtree.ReferenceNode; import org.w3c.dom.Attr; import org.w3c.dom.CharacterData; import org.w3c.dom.Comment; @@ -109,6 +110,9 @@ while (node != null) { startNode(node); Node nextNode = node.getFirstChild(); + //TODO : make it happy + if (node instanceof ReferenceNode) + nextNode = null; while (nextNode == null) { endNode(node); if (top != null && top.equals(node)) @@ -122,7 +126,7 @@ break; } } - } + } node = nextNode; } if(callDocumentEvents) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 21:44:36
|
Revision: 3013 Author: brihaye Date: 2006-03-30 13:44:32 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3013&view=rev Log Message: ----------- Made commons-fileupload-1.1.jar available to the standalone server. Thanks to bschmaus Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/start/start.config Modified: trunk/eXist-1.0/src/org/exist/start/start.config =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 21:42:26
|
Revision: 3012 Author: brihaye Date: 2006-03-30 13:42:20 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3012&view=rev Log Message: ----------- Made serializer happier. Still 1 error in the test suite. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java Modified: trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java 2006-03-30 16:57:06 UTC (rev 3011) +++ trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java 2006-03-30 21:42:20 UTC (rev 3012) @@ -632,15 +632,11 @@ while (node != null) { copyStartNode(node, receiver, expandRefs); NodeImpl nextNode; - //TODO : we should not have a ClassCastException there - //The problem occurs for persistent referenced nodes - //that are not castable to org.exist.memtree.NodeImpl - //Question : how to send such a persisten node to the receiver ? -pb - try { - nextNode = (NodeImpl) node.getFirstChild(); - } catch (ClassCastException e) { - throw new RuntimeException("Attempt to access persistent node as a memory node", e); - } + if (node instanceof ReferenceNode) + //Nothing more to stream ? + nextNode = null; + else + nextNode = (NodeImpl) node.getFirstChild(); while (nextNode == null) { copyEndNode(node, receiver); if (top != null && top.nodeNumber == node.nodeNumber) @@ -802,15 +798,11 @@ while (node != null) { startNode(serializer, node, receiver); NodeImpl nextNode; - //TODO : we should not have a ClassCastException there - //The problem occurs for persistent referenced nodes - //that are not castable to org.exist.memtree.NodeImpl - //Question : how to send such a persisten node to the receiver ? -pb - try { - nextNode = (NodeImpl) node.getFirstChild(); - } catch (ClassCastException e) { - throw new RuntimeException("Attempt to access persistent node as a memory node", e); - } + if (node instanceof ReferenceNode) + //Nothing more to stream ? + nextNode = null; + else + nextNode = (NodeImpl) node.getFirstChild(); while (nextNode == null) { endNode(node, receiver); if (top != null && top.nodeNumber == node.nodeNumber) break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 16:57:19
|
Revision: 3011 Author: brihaye Date: 2006-03-30 08:57:06 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3011&view=rev Log Message: ----------- Definitively fixed reference nodes bug in deep-equal() ? Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java 2006-03-30 15:29:08 UTC (rev 3010) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java 2006-03-30 16:57:06 UTC (rev 3011) @@ -208,8 +208,7 @@ if (nodeType == NodeImpl.REFERENCE_NODE) { //Retrieve the actual node type NodeProxy p = ((ReferenceNode)n).getReference(); - nodeType = p.getNodeType(); - n = p.getNode(); + nodeType = p.getNodeType(); } while (!(nodeType == Node.ELEMENT_NODE || nodeType == Node.TEXT_NODE)) { n = n.getNextSibling(); Modified: trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java 2006-03-30 15:29:08 UTC (rev 3010) +++ trunk/eXist-1.0/src/org/exist/xquery/test/DeepEqualTest.java 2006-03-30 16:57:06 UTC (rev 3011) @@ -233,6 +233,29 @@ createDocument("test", "<test><a><b/></a><a><b/>hello</a></test>"); assertQuery(false, "deep-equal(/test/*[1], /test/*[2])"); } + + //Courtesy : Dizzz + public void testElements14() { + //Includes a reference node + String query = + "let $parSpecs1 := <ParameterSpecifications/> " + + "let $funSpecs2 := " + + " <FunctionSpecifications>" + + " <FunctionName>Func2</FunctionName>" + + " { $parSpecs1 }" + + " </FunctionSpecifications>" + + "return " + + " deep-equal("+ + " <FunctionVerifications>" + + " <FunctionName>Func2</FunctionName>" + + " </FunctionVerifications>" + + "," + + " <FunctionVerifications>" + + " { $funSpecs2/FunctionName }" + + " </FunctionVerifications>"+ + " )"; + assertQuery(true, query); + } public void testNSElements1() { createDocument("test", "<test xmlns:p='urn:foo' xmlns:q='urn:foo'><p:a/><q:a/></test>"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 15:29:21
|
Revision: 3010 Author: brihaye Date: 2006-03-30 07:29:08 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3010&view=rev Log Message: ----------- Improved fn:deep-equal() with regard to reference nodes. Given a bit of abstraction to NodeImpl (to be continued) Improvements to ReferenceNode that have to be continued... unless the serialization process is revisited. Currently 4 failures in the test suite because of serailization problems. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java 2006-03-30 15:28:44 UTC (rev 3009) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunDeepEqual.java 2006-03-30 15:29:08 UTC (rev 3010) @@ -159,18 +159,33 @@ } private boolean compareElements(Node a, Node b) { - return - compareNames(a, b) - && compareAttributes(a, b) - && compareContents(a, b); + if (!compareNames(a, b)) + return false; + if (!compareAttributes(a, b)) + return false; + if (!compareContents(a, b)) + return false; + return true; } private boolean compareContents(Node a, Node b) { a = findNextTextOrElementNode(a.getFirstChild()); b = findNextTextOrElementNode(b.getFirstChild()); while(!(a == null || b == null)) { - if (a.getNodeType() != b.getNodeType()) return false; - switch(a.getNodeType()) { + int nodeTypeA = a.getNodeType(); + if (nodeTypeA == NodeImpl.REFERENCE_NODE) { + //Retrieve the actual node type + NodeProxy p = ((ReferenceNode)a).getReference(); + nodeTypeA = p.getNodeType(); + } + int nodeTypeB = b.getNodeType(); + if (nodeTypeB == NodeImpl.REFERENCE_NODE) { + //Retrieve the actual node type + NodeProxy p = ((ReferenceNode)b).getReference(); + nodeTypeB = p.getNodeType(); + } + if (nodeTypeA != nodeTypeB) return false; + switch(nodeTypeA) { case Node.TEXT_NODE: if (!safeEquals(a.getNodeValue(), b.getNodeValue())) return false; break; @@ -189,15 +204,18 @@ private Node findNextTextOrElementNode(Node n) { if (n == null) return null; - if (n.getNodeType() == NodeImpl.REFERENCE_NODE) { - //Retrieve the actual node + int nodeType = n.getNodeType(); + if (nodeType == NodeImpl.REFERENCE_NODE) { + //Retrieve the actual node type NodeProxy p = ((ReferenceNode)n).getReference(); - n = p.getNode(); + nodeType = p.getNodeType(); + n = p.getNode(); } - while (!(n.getNodeType() == Node.ELEMENT_NODE || n.getNodeType() == Node.TEXT_NODE)) { - n = n.getNextSibling(); + while (!(nodeType == Node.ELEMENT_NODE || nodeType == Node.TEXT_NODE)) { + n = n.getNextSibling(); if (n == null) return null; + nodeType = n.getNodeType(); } return n; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 15:29:00
|
Revision: 3009 Author: brihaye Date: 2006-03-30 07:28:44 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3009&view=rev Log Message: ----------- Improved fn:deep-equal() with regard to reference nodes. Given a bit of abstraction to NodeImpl (to be continued) Improvements to ReferenceNode that have to be continued... unless the serialization process is revisited. Currently 4 failures in the test suite because of serailization problems. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/memtree/CommentImpl.java trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java trunk/eXist-1.0/src/org/exist/memtree/ReferenceNode.java trunk/eXist-1.0/src/org/exist/memtree/TextImpl.java Modified: trunk/eXist-1.0/src/org/exist/memtree/CommentImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/CommentImpl.java 2006-03-30 13:42:35 UTC (rev 3008) +++ trunk/eXist-1.0/src/org/exist/memtree/CommentImpl.java 2006-03-30 15:28:44 UTC (rev 3009) @@ -24,6 +24,7 @@ import org.w3c.dom.Comment; import org.w3c.dom.DOMException; +import org.w3c.dom.Node; public class CommentImpl extends NodeImpl implements Comment { @@ -34,6 +35,10 @@ public CommentImpl(DocumentImpl doc, int nodeNumber) { super(doc, nodeNumber); } + + public Node getFirstChild() { + return null; + } /* (non-Javadoc) * @see org.w3c.dom.CharacterData#getData() Modified: trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java 2006-03-30 13:42:35 UTC (rev 3008) +++ trunk/eXist-1.0/src/org/exist/memtree/DocumentImpl.java 2006-03-30 15:28:44 UTC (rev 3009) @@ -631,7 +631,16 @@ NodeImpl top = node; while (node != null) { copyStartNode(node, receiver, expandRefs); - NodeImpl nextNode = (NodeImpl) node.getFirstChild(); + NodeImpl nextNode; + //TODO : we should not have a ClassCastException there + //The problem occurs for persistent referenced nodes + //that are not castable to org.exist.memtree.NodeImpl + //Question : how to send such a persisten node to the receiver ? -pb + try { + nextNode = (NodeImpl) node.getFirstChild(); + } catch (ClassCastException e) { + throw new RuntimeException("Attempt to access persistent node as a memory node", e); + } while (nextNode == null) { copyEndNode(node, receiver); if (top != null && top.nodeNumber == node.nodeNumber) @@ -792,7 +801,16 @@ NodeImpl top = node; while (node != null) { startNode(serializer, node, receiver); - NodeImpl nextNode = (NodeImpl) node.getFirstChild(); + NodeImpl nextNode; + //TODO : we should not have a ClassCastException there + //The problem occurs for persistent referenced nodes + //that are not castable to org.exist.memtree.NodeImpl + //Question : how to send such a persisten node to the receiver ? -pb + try { + nextNode = (NodeImpl) node.getFirstChild(); + } catch (ClassCastException e) { + throw new RuntimeException("Attempt to access persistent node as a memory node", e); + } while (nextNode == null) { endNode(node, receiver); if (top != null && top.nodeNumber == node.nodeNumber) break; Modified: trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-30 13:42:35 UTC (rev 3008) +++ trunk/eXist-1.0/src/org/exist/memtree/NodeImpl.java 2006-03-30 15:28:44 UTC (rev 3009) @@ -246,7 +246,8 @@ * @see org.w3c.dom.Node#getFirstChild() */ public Node getFirstChild() { - return null; + //TODO : make abstract -pb + throw new RuntimeException("Can not call getFirstChild() from here"); } /* (non-Javadoc) @@ -276,7 +277,8 @@ * @see org.w3c.dom.Node#getAttributes() */ public NamedNodeMap getAttributes() { - return null; + //TODO : make abstract -pb + throw new RuntimeException("Can not call getAttributes() from here"); } /* (non-Javadoc) @@ -378,7 +380,8 @@ * @see org.w3c.dom.Node#getLocalName() */ public String getLocalName() { - return ""; + //TODO : make abstract -pb + throw new RuntimeException("Can not call getLocalName() from here"); } /* (non-Javadoc) Modified: trunk/eXist-1.0/src/org/exist/memtree/ReferenceNode.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/ReferenceNode.java 2006-03-30 13:42:35 UTC (rev 3008) +++ trunk/eXist-1.0/src/org/exist/memtree/ReferenceNode.java 2006-03-30 15:28:44 UTC (rev 3009) @@ -23,6 +23,8 @@ package org.exist.memtree; import org.exist.dom.NodeProxy; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; /** * @author wolf @@ -49,4 +51,21 @@ result.append(" ]"); return result.toString(); } + + public String getNamespaceURI() { + return getReference().getNode().getNamespaceURI(); + } + + public String getLocalName() { + return getReference().getNode().getLocalName(); + } + + public NamedNodeMap getAttributes() { + return getReference().getNode().getAttributes(); + } + + public Node getFirstChild() { + //TODO : how to make this node a reference as well ? + return getReference().getNode().getFirstChild(); + } } Modified: trunk/eXist-1.0/src/org/exist/memtree/TextImpl.java =================================================================== --- trunk/eXist-1.0/src/org/exist/memtree/TextImpl.java 2006-03-30 13:42:35 UTC (rev 3008) +++ trunk/eXist-1.0/src/org/exist/memtree/TextImpl.java 2006-03-30 15:28:44 UTC (rev 3009) @@ -23,6 +23,7 @@ package org.exist.memtree; import org.w3c.dom.DOMException; +import org.w3c.dom.Node; import org.w3c.dom.Text; public class TextImpl extends NodeImpl implements Text { @@ -66,6 +67,14 @@ public String getNodeValue() throws DOMException { return getData(); } + + public String getLocalName() { + return ""; + } + + public Node getFirstChild() { + return null; + } /* (non-Javadoc) * @see org.w3c.dom.CharacterData#substringData(int, int) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-03-30 13:42:46
|
Revision: 3008 Author: wolfgang_m Date: 2006-03-30 05:42:35 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3008&view=rev Log Message: ----------- Updated the "powered by" page. Removed broken links, added new. Modified Paths: -------------- trunk/eXist-1.0/webapp/apps/applications.xml Modified: trunk/eXist-1.0/webapp/apps/applications.xml =================================================================== --- trunk/eXist-1.0/webapp/apps/applications.xml 2006-03-30 07:28:45 UTC (rev 3007) +++ trunk/eXist-1.0/webapp/apps/applications.xml 2006-03-30 13:42:35 UTC (rev 3008) @@ -37,51 +37,6 @@ </application> <application> - <dc:creator>Divstrat Pty Ltd</dc:creator> - <dc:identifier>http://www.divstrat.com.au/ds_webfiles_17/ds_Xunami.html</dc:identifier> - <dc:rights>(c)2004 Divstrat</dc:rights> - <dc:title>Xunami</dc:title> - <dc:subject>multimedia</dc:subject> - <dc:subject>indexing</dc:subject> - <dc:subject>retrieval</dc:subject> - <dc:subject>multi-lingual</dc:subject> - <dc:description> - Xunami is a web-based, multi-lingual, digital multimedia, - indexing and retrieval system - </dc:description> - <dc:publisher>Divstrat Pty Ltd</dc:publisher> - <dc:format> - Web application, Webstart download, CD, HTML pages - </dc:format> - - <dev-site>http://www.divstrat.com.au/</dev-site> - <third-party-feature-used> - Quicktime for Java - </third-party-feature-used> - <third-party-feature-used> - Jakarta Tomcat - </third-party-feature-used> - <third-party-feature-used>JDOM</third-party-feature-used> - <third-party-feature-used>Jaxen</third-party-feature-used> - <third-party-feature-used>Alloy LNF</third-party-feature-used> - - <datatype-stored targetnamespace="urn:mpeg:mpeg7:schema:2001"> - MPEG-7 - </datatype-stored> - <datatype-stored - targetnamespace="http://purl.org/dc/elements/1.1/"> - Dublin Core - </datatype-stored> - <database updates="frequent" security="multi-level"></database> - <dev-notes> - Java, Servlets, JSP, Trax XSLT transforms,Swing GUI, HTML - GUI - </dev-notes> - <submitter>mailto:jv...@di...</submitter> - </application> - - - <application> <dc:creator> Music Techonology Group (Barcelona, SPAIN) </dc:creator> @@ -108,53 +63,7 @@ <submitter>mailto:oc...@iu...</submitter> </application> - <application> - <dc:creator> - SozioNet Project, Darmstadt University of Technology, Dpt. - of Sociology - </dc:creator> - <dc:identifier>http://www.sozionet.org</dc:identifier> - <dc:title>SozioNet</dc:title> - <dc:subject>social science</dc:subject> - <dc:subject>metadata creation</dc:subject> - <dc:subject>metadata harvesting</dc:subject> - <dc:description> - Inspired by successful projects like MathNet or SOSIG, - SozioNet provides access to freely available web resources - with relevance to social science. It is based on a network - of social science institutions and scientists, to agree on - and establish common metadata standards, and to provide a - general infrastructure for metadata creation, harvesting and - retrieval. All SozioNet components, including the user - interface for metadata creation and the harvesting - framework, are entirely based on XML and rely on eXist as - storage backend. - </dc:description> - <dc:format>Web application</dc:format> - <feature-used>XQuery</feature-used> - <feature-used>Cocoon</feature-used> - <production-site>http://www.sozionet.org</production-site> - <status>production</status> - <third-party-feature-used> - Cocoon XMLForms - </third-party-feature-used> - <third-party-feature-used> - Apache Avalon - </third-party-feature-used> - <datatype-stored>RDF</datatype-stored> - <datatype-stored - targetnamespace="http://purl.org/dc/elements/1.1/"> - Dublin Core - </datatype-stored> - <datatype-stored>OWL</datatype-stored> - <datatype-stored>MODS</datatype-stored> - <dev-notes> - The query interface served as a testbed for eXist's XQuery - implementation. It is itself completely written in XQuery. - </dev-notes> - </application> - - <application> + <!--application> <dc:title>Weblounge</dc:title> <dc:identifier>http://www.o2it.ch/products/weblounge</dc:identifier> <dc:description> @@ -170,7 +79,7 @@ <dc:creator>O2 IT Engineering</dc:creator> <dc:rights>Copyright by O2 IT Engineering</dc:rights> <dev-site>http://www.o2it.ch</dev-site> - </application> + </application--> <application> <dc:title>MyCoRe</dc:title> @@ -263,7 +172,7 @@ <application> <dc:creator>Arnis Vuskans (ampatspell)</dc:creator> <dc:rights>GPL</dc:rights> - <dc:title><sic/> XML Powered Assessment System</dc:title> + <dc:title>XML Powered Assessment System: <sic/></dc:title> <dc:subject>assessment</dc:subject> <dc:subject>evaluation</dc:subject> <dc:description> @@ -348,4 +257,117 @@ <third-party-feature-used>Epic Editor</third-party-feature-used> <third-party-feature-used>Java specific modules</third-party-feature-used> </application> + + <application> + <demo-site>http://dynaprism.org/</demo-site> + <dc:creator>Jakob Fix, Bureau Veritas (Marine Division)</dc:creator> + <creator-site>http://dynaprism.org/</creator-site> + <dc:creator>Bruno Chatel, Chadocs</dc:creator> + <creator-site>http://www.chadocs.com/</creator-site> + <dc:title>dynaprism</dc:title> + <dc:format>Jetty + Cocoon + eXist</dc:format> + <dc:description> + <br/>An online application which gives access to the Bureau Veritas + Rules documents. Can be run on a server, locally installed, or off a CD-ROM. + <br/>Has Table of Contents, List of Figures, List of Tables. + <br/>Supports cross-document links. + <br/>Has a quite powerful search facility (thanks to eXist). + <br/>All content fragments and all ToC/LoF/LoT fragments are served by eXist. + <br/>Serves (static) PDF files for printing. Runs in Internet Explorer or Mozilla Firefox. + <br/>Makes rather heavy use of XMLHTTPRequest objects to create rich client. + <br/>Has a complex ant-based backend that takes output from FrameMaker+SGML + and converts it to XML, and prepares it for import in eXist. + <br/>Wants to be a framework rather than a hard-coded application, + but so far no time has been found to adapt it to other documents, like the TEI P5. + <br/>The name is a contraction of Dyna(Web|Text) and DualPrism (well, who remembers the one or the other?). + </dc:description> + <dc:publisher>Bureau Veritas, Marine Division</dc:publisher> + <status>beta</status> + <feature-used>XQuery</feature-used> + <feature-used>Cocoon</feature-used> + <feature-used>Jetty</feature-used> + <database size="30Mb" documents="3" updates="none" security='read for all' /> + <dev-notes>Cocoon sitemaps, Javascript, XSP pages, XSLT styles, XMLHTTPRequest; runs on a server, or from CD-ROM.</dev-notes> + <submitter>Jakob Fix</submitter> + </application> + + <application> + <dc:creator>Thorsten Meinl</dc:creator> + <creator-site>http://www2.informatik.uni-erlangen.de/</creator-site> + <dc:identifier>http://www2.informatik.uni-erlangen.de/</dc:identifier> + <dc:rights>GPL</dc:rights> + <dc:title>FAU Erlangen-Nuremberg - Computer Science Department 2</dc:title> + <dc:subject>computer science</dc:subject> + <dc:subject>university</dc:subject> + <dc:description>This is the homepage of our chair. We use eXist and Cocoon to reuse most information that is already stored in the university-wide UnivIS system.</dc:description> + <dc:publisher>Computer Science Department 2</dc:publisher> + <dc:format>storage of data for lectures, publications, theses, etc. that was imported form the UnivIS system</dc:format> + <dev-site>http://faui20b.informatik.uni-erlangen.de/</dev-site> + <production-site>http://www2.informatik.uni-erlangen.de/</production-site> + <status>production</status> + <feature-used>XQuery</feature-used> + <feature-used>Cocoon</feature-used> + <database size="6Mb" documents="20" updates="frequent" security="read for all"/> + <dev-notes>fully integrated into Cocoon using the XMLDBTransformer</dev-notes> + <submitter>me...@cs...</submitter> + </application> + <applications + + xmlns="http://exist-db.org/" + + using="http://exist-db.org/" + + xmlns:dc="http://purl.org/dc/elements/1.1/" + + xmlns:html="http://www.w3.org/1999/xhtml"> + + <application> + + <dc:creator>Igor Barma</dc:creator> + <dc:creator>Steve giraud</dc:creator> + + <creator-site>http://www.pentila.com</creator-site> + + <dc:identifier>http://www.pentila.com/produits</dc:identifier> + + <dc:rights>ZPL2.1 and GPL products</dc:rights> + + <dc:title>Metadata TK, ZOpenArchives and XMLFinder</dc:title> + + <dc:subject>Metadata creation</dc:subject> + + <dc:subject>OAI metadata harvesting</dc:subject> + + <dc:subject>Ressources finder and retrieval</dc:subject> + + <dc:description> Three Plone/Zope products that allow you to turn your eXistDB into an OAI aggregator and repository, perform eXist search from a plone site or create new metadata entries and store them. Visit our site for more informations and downloads. + + </dc:description> + + <dc:publisher> Pentila </dc:publisher> + + <dc:format>Plone or Zope products</dc:format> + + <dev-site>http://www.pentila.com/produits/</dev-site> + + <status>beta</status> + + <feature-used>XQuery</feature-used> + + <feature-used>XUpdate</feature-used> + <feature-used>OAI-PMH</feature-used> + <feature-used>XSLT</feature-used> + <feature-used>python</feature-used> + <feature-used>Plone</feature-used> + <feature-used>Zope</feature-used> + + <dev-notes> XQuery, XUpdate, OAI-PMH, XSLT, Plone/Zope and python </dev-notes> + + <submitter /> + + </application> + + </applications> + + </applications> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-30 07:28:49
|
Revision: 3007 Author: brihaye Date: 2006-03-29 23:28:45 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3007&view=rev Log Message: ----------- "." as an abreviation for an *atomic* context item (e.g. (1)[.= 1]) should now be handled. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-29 22:55:46 UTC (rev 3006) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-03-30 07:28:45 UTC (rev 3007) @@ -84,6 +84,8 @@ * of a FLWOR expression. */ protected boolean inWhereClause = false; + + protected boolean invalidNodeEvaluation = false; public GeneralComparison(XQueryContext context, int relation) { this(context, relation, Constants.TRUNC_NONE); @@ -126,19 +128,15 @@ contextInfo.setParent(this); super.analyze(contextInfo); inWhereClause = (contextInfo.getFlags() & IN_WHERE_CLAUSE) != 0; + //Ugly workaround for the polysemy of "." which is expanded as self::node() even when it is not relevant + // (1)[.= 1] works... + invalidNodeEvaluation = getLeft() instanceof LocationStep && ((LocationStep)getLeft()).axis == Constants.SELF_AXIS; } /* (non-Javadoc) * @see org.exist.xquery.BinaryOp#returnsType() */ public int returnsType() { - - //Ugly workaround for the polysemy of "." which is expanded as self::node() even when it is not relevant - //boolean invalidNodeEvaluation = - // getLeft() instanceof LocationStep && ((LocationStep)getLeft()).axis == Constants.SELF_AXIS; - //TODO : uncomment and improve code above to make (1)[.= 1] work... - boolean invalidNodeEvaluation = false; - if (inPredicate && !invalidNodeEvaluation && (!Dependency.dependsOn(getDependencies(), Dependency.CONTEXT_ITEM))) { /* If one argument is a node set we directly * return the matching nodes from the context set. This works @@ -184,13 +182,7 @@ } Sequence result = null; - - //Ugly workaround for the polysemy of "." which is expanded as self::node() even when it is not relevant - //boolean invalidNodeEvaluation = contextSequence != null && !Type.subTypeOf(contextSequence.getItemType(), Type.NODE) && - // getLeft() instanceof LocationStep && ((LocationStep)getLeft()).axis == Constants.SELF_AXIS; - //TODO : uncomment and improve code above to make (1)[.= 1] work... - boolean invalidNodeEvaluation = false; - + /* * If we are inside a predicate and one of the arguments is a node set, * we try to speed up the query by returning nodes from the context set. @@ -749,6 +741,6 @@ super.resetState(); getLeft().resetState(); getRight().resetState(); - cached = null; + cached = null; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ha...@us...> - 2006-03-29 22:56:01
|
Revision: 3006 Author: harrah Date: 2006-03-29 14:55:46 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3006&view=rev Log Message: ----------- Substantially updated XACML documentation: -split documentation into four parts -Completed capabilities of XACML in eXist documentation -Wrote Introduction to XACML documentation -Started graphical policy editor documentation -Started developer documentation Modified Paths: -------------- trunk/eXist-1.0/webapp/xacml.xml Added Paths: ----------- trunk/eXist-1.0/webapp/resources/policy-editor_disabled.png trunk/eXist-1.0/webapp/resources/policy-editor_initial.png trunk/eXist-1.0/webapp/resources/policy-editor_policy.png trunk/eXist-1.0/webapp/resources/policy-editor_target.png trunk/eXist-1.0/webapp/resources/policy-editor_target2.png trunk/eXist-1.0/webapp/resources/policy-hierarchy.png trunk/eXist-1.0/webapp/xacml-dev.xml trunk/eXist-1.0/webapp/xacml-features.xml trunk/eXist-1.0/webapp/xacml-intro.xml trunk/eXist-1.0/webapp/xacml-usage.xml Added: trunk/eXist-1.0/webapp/resources/policy-editor_disabled.png =================================================================== (Binary files differ) Property changes on: trunk/eXist-1.0/webapp/resources/policy-editor_disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/eXist-1.0/webapp/resources/policy-editor_initial.png =================================================================== (Binary files differ) Property changes on: trunk/eXist-1.0/webapp/resources/policy-editor_initial.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/eXist-1.0/webapp/resources/policy-editor_policy.png =================================================================== (Binary files differ) Property changes on: trunk/eXist-1.0/webapp/resources/policy-editor_policy.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/eXist-1.0/webapp/resources/policy-editor_target.png =================================================================== (Binary files differ) Property changes on: trunk/eXist-1.0/webapp/resources/policy-editor_target.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/eXist-1.0/webapp/resources/policy-editor_target2.png =================================================================== (Binary files differ) Property changes on: trunk/eXist-1.0/webapp/resources/policy-editor_target2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/eXist-1.0/webapp/resources/policy-hierarchy.png =================================================================== (Binary files differ) Property changes on: trunk/eXist-1.0/webapp/resources/policy-hierarchy.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/eXist-1.0/webapp/xacml-dev.xml =================================================================== --- trunk/eXist-1.0/webapp/xacml-dev.xml (rev 0) +++ trunk/eXist-1.0/webapp/xacml-dev.xml 2006-03-29 22:55:46 UTC (rev 3006) @@ -0,0 +1,83 @@ +<?xml version="1.0"?> +<!--<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd">--> + +<book xmlns:ci="http://apache.org/cocoon/include/1.0"> + + <bookinfo> + <graphic fileref="logo.jpg"/> + <title>Open Source Native XML Database</title> + <author> + <firstname>Mark</firstname> + <surname>Harrah</surname> + <affiliation> + <address format="linespecific"> + <email>ha...@um...</email> + </address> + </affiliation> + </author> + </bookinfo> + + <ci:include src="sidebar.xml"/> + + <chapter> + <title>Access Control in eXist: XACML Developer's Guide</title> + <para> + This guide provides information to developers interested in adding access + control to eXist or potentially users writing applications that use eXist's + internal XACML-related classes (note that this is not supported, though). + </para> + <section> + <title>Selecting XACML for Access Control</title> + <para> + XACML is a powerful standard for controlling access to resources, but as + with any technology it has advantages and disadvantages. One potential + disadvantage is the learning curve required by administrators to write + policies. This may be somewhat mitigated by a graphical policy editor, + such as the one in eXist's graphical client. However, this takes more + work on the part of the developer (although, hopefully not too much: see + the section (PENDING) on adding graphical editing for new access control + points). Additionally, the administrator still needs to know some general + information about the concepts behind XACML. This is certainly more work + than applying previous knowledge about and experience with Unix-based + permissions or role-based access control. + </para> + <para> + The second potential disadvantage is performance. Currently, the support that + eXist provides to the Policy Decision Point (PDP) does not include indexing + policies. This means that when the PDP receives an access request, it must + ask each policy if it applies to the request until a policy applies. This + simple method is quite sufficient for the current use of XACML in eXist; however, + more advanced methods such as indexing and perhaps intelligent caching of results + might be needed for uses that involve a substantial number of access requests + in a short time or uses that will likely encourage the use of many policies + or large policies. + </para> + <para> + Given these two disadvantages, XACML is still a good choice for access control + in many situations. It is highly flexible, it is a well designed standard, and + the disadvantages can be compensated for. + </para> + <para> + TODO: Finish section + </para> + </section> + <section> + <title>Adding a Policy Enforcement Point (PEP)</title> + <para> + TODO: Write section + </para> + </section> + <section> + <title>Generating a Request</title> + <para> + TODO: Write section + </para> + </section> + <section> + <title>Interpreting a Response</title> + <para> + TODO: Write section + </para> + </section> + </chapter> +</book> \ No newline at end of file Added: trunk/eXist-1.0/webapp/xacml-features.xml =================================================================== --- trunk/eXist-1.0/webapp/xacml-features.xml (rev 0) +++ trunk/eXist-1.0/webapp/xacml-features.xml 2006-03-29 22:55:46 UTC (rev 3006) @@ -0,0 +1,185 @@ +<?xml version="1.0"?> +<!--<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd">--> + +<book xmlns:ci="http://apache.org/cocoon/include/1.0"> + + <bookinfo> + <graphic fileref="logo.jpg"/> + <title>Open Source Native XML Database</title> + <author> + <firstname>Mark</firstname> + <surname>Harrah</surname> + <affiliation> + <address format="linespecific"> + <email>ha...@um...</email> + </address> + </affiliation> + </author> + </bookinfo> + + <ci:include src="sidebar.xml"/> + + <chapter> + <title>Access Control in eXist: Capabilities</title> + <para> + In XACML, access to resources (such as an XQuery or a Java method) can be + controlled by characteristics of the subject(s) accessing the resource (a common + subject is a user executing a query), the resource being accessed, the action + being taken on the resource (such as 'execute query'), or the environment in + which the access is being made (such as the time of the access). This part of + the documentation provides an overview of what subjects, resources, and + actions are available and what characteristics of those entities may + be use to control access. + </para> + + <section> + <title>Subjects</title> + <section> + <title>User</title> + <para> + All types of access may be restricted by the user initiating access to a + resource, currently XQueries. The user's name and the names of the groups + of which the user is a member may be used to control access to any of the + supported resources mentioned in the Resources section. + </para> + </section> + <section> + <title>Intermediaries</title> + <para> + There is no support yet for access control based on the route taken to the + resource. This type of control would allow, for example, a user to use a + library module library.xqm by running query.xql but not through a query + passed directly in the HTTP request. + </para> + </section> + </section> + <section> + <title>Resources</title> + <para> + All XQuery modules may be controlled by their source. A + source has a type (Cocoon, URL, Class, File, Database, String, or + ClassLoader resource) and a key. The key is specific to the source. For + URLs, ClassLoader resources, and Cocoon, the key is the URI or URL of the + source. + </para> + <para> + Access may also be controlled based on the method of access. The following + are direct access contexts: REST, XML:DB (local), XML-RPC, WebDAV, and SOAP. + Additionally, some contexts are indirectly used: eXist internally executes + queries for validation, triggers may execute queries, and XInclude expansion + requries evaluation of a query. There is also a context for unit tests + when they directly access the query classes without going through one + of the above interfaces. + </para> + <itemizedlist> + <listitem> + <para> + A String source comes from directly passed queries. This may occur + externally through the REST-style interface or XML:DB or eXist may + internally execute queries directly. The key is "String" for every + String source. This source is only used for main modules. + </para> + </listitem> + <listitem> + <para> + A source of type File comes directly from the filesystem. The key is the + absolute path to the file. External library modules or main modules may + have this source type. + </para> + </listitem> + <listitem> + <para> + A source of type Database is stored in the database. The key is the absolute + path to the resource (such as /db/test/test.xqm). External library modules or + main modules may have this source type. + </para> + </listitem> + <listitem> + <para> + Cocoon sources are sources requested from a Cocoon context. The key is the + URI to the resource. Main modules may have this source type. + </para> + </listitem> + <listitem> + <para> + Class sources are sources that are Java classes. The key is the fully + qualified name of the class. These will always be the type of internal + library modules and reflective access to Java methods. + </para> + </listitem> + <listitem> + <para> + URL sources have as the key the URL. External library modules or main modules + may have this source type. + </para> + </listitem> + <listitem> + <para> + Class loader sources are those resources found by the class loader. The key is + the path to the resource. External library modules or main modules may have this + source type. + </para> + </listitem> + </itemizedlist> + <section> + <title>Java Reflection</title> + <para> + Invocation of Java methods by reflection may be restricted by class and + method name. + </para> + </section> + <section> + <title>Internal XQuery Library Modules</title> + <para> + Calls to XQuery functions in modules written in Java may be restricted + by the name of the implementing module's class, the module's namespace URI, + and the name of the function. + </para> + </section> + <section> + <title>External XQuery Library Modules</title> + <para> + Calls to XQuery functions in library modules stored in the + database or the file system may be restricted by namespace URI, function name, + and module source. + </para> + </section> + <section> + <title>XQuery Main Modules</title> + <para> + Query execution may be controlled by the source of the query. + </para> + </section> + <note> + <para>Overloaded Java methods and XQuery functions share the same access + control settings. + </para> + </note> + </section> + <section> + <title>Actions</title> + <para> + There is currently one action for each type of resource. The 'execute query' + action corresponds to the XQuery main module resource, the 'call function' action + corresponds to the XQuery library module resource (both internal and external), + and the 'invoke method' action corresponds to the Java method resource. + </para> + </section> + <section> + <title>Environment</title> + <para> + The characteristics of the environment that are present are the current date + and time. + </para> + </section> + <section> + <title>What is not controlled</title> + <para> + You cannot control access to documents, HTTP put or get requests, which + XML-RPC methods may be invoked, or anything else not explicitly mentioned + above. Additionally, there is currently no supported method of using eXist's + XACML-related classes for access control in your own application. + </para> + </section> + </chapter> +</book> Added: trunk/eXist-1.0/webapp/xacml-intro.xml =================================================================== --- trunk/eXist-1.0/webapp/xacml-intro.xml (rev 0) +++ trunk/eXist-1.0/webapp/xacml-intro.xml 2006-03-29 22:55:46 UTC (rev 3006) @@ -0,0 +1,393 @@ +<?xml version="1.0"?> +<!--<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd">--> + +<book xmlns:ci="http://apache.org/cocoon/include/1.0"> + + <bookinfo> + <graphic fileref="logo.jpg"/> + <title>Open Source Native XML Database</title> + <author> + <firstname>Mark</firstname> + <surname>Harrah</surname> + <affiliation> + <address format="linespecific"> + <email>ha...@um...</email> + </address> + </affiliation> + </author> + </bookinfo> + + <ci:include src="sidebar.xml"/> + + <chapter> + <title>Access Control in eXist: Introduction to XACML</title> + <section> + <title>The XACML Standard</title> + <para> + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml"> + eXtensible Access Control Markup Language (XACML) + </ulink> is an OASIS standard for + restricting access to resources. eXist currently uses version + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml#XACML11"> + 1.1 + </ulink> + / + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml#XACML10"> + 1.0 + </ulink> + of the standard. The most recent version is + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml#XACML20"> + 2.0 + </ulink> (unsupported). + Work on version 3.0 is currently + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml#CURRENT"> + in progress. + </ulink> + The following background information on XACML is not exhaustive. It is meant to be + a relatively brief introduction to XACML in order to get started using XACML in eXist. + </para> + </section> + <section> + <title>Basic Terminology</title> + <para>There are a few common terms used when discussing XACML. There are many more terms + explicitly defined in the glossaries of the specifications; these terms are the ones + that occur frequently throughout this documentation and are the most important for an + overall understanding of XACML. Additionally, the below explanations are not the + official definitions given in the XACML specifications. Those definitions may be found + in the glossary of any of the specifications listed in the previous section. + </para> + <variablelist> + <varlistentry> + <term>Resource</term> + <listitem> + <para> + A resource is anything to which access can be controlled. Examples include + XQuery modules and Java methods. + </para></listitem> + </varlistentry> + <varlistentry> + <term>Access Request</term> + <listitem> + <para> + An access request consists of attributes that describe an operation on a + resource. There are usually attributes providing information about the + subject(s) (for example, a user) making the access, the resource being + accessed, and the action being performed on the resource (such as 'execute + query' or 'call function'). + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Policy</term> + <listitem> + <para> + A policy is a group of definitions that restricts access to resources. + Policies are generally written by a database administrator. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>PEP</term> + <listitem> + <para> + A Policy Enforcement Point (PEP) generates the access request to the + Policy Decision Point (PDP). It interprets the PDP's decision and + proceeds accordingly. For example, the PEP will likely perform the + access if it is allowed or provide feedback to the user + if the access is not allowed. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>PDP</term> + <listitem> + <para> + A Policy Decision Point (PDP) handles an access request and + determines if that access is allowed. The PDP uses policies + in order to make that decision. + </para> + </listitem> + </varlistentry> + </variablelist> + </section> + <section> + <title>An Example</title> + <para> + To try to help make the key terms and their usage clearer, here is an example of an + XACML use case in eXist. + </para> + <para> + A user clicks the Function Library documentation link on the left sidebar on the eXist + webpage. This causes a request to eXist to execute the XQuery functions.xq. The code + responsible for executing XQueries contains a Policy Enforcement Point (PEP) that + generates an access request. This request contains the user making the request (in this + case, the user under which Cocoon runs), the interface used to make the request (Cocoon + uses the XML:DB interface, so 'XML:DB' is the specified interface in the request), the + source of the query (which is 'functions.xq' for this example), and the action being + performed on the resource (in this example, 'execute' is the action). + </para> + <para> + The PEP makes the request to the Policy Decision Point (PDP). The PDP finds the + applicable policy out of all of the policies created by the administrator. The PDP + then checks the request against the policy, makes a decision, and informs the PEP. + Let's say that in this example, the administrator decided to allow execution of + functions.xq by everyone. The PDP then informs the PDP that functions.xq may be + executed. + </para> + <para> + The PEP gets the response from the PDP that executing functions.xq is allowed. It allows + the query execution code to proceed. If the access were denied, it would have thrown a + PermissionDeniedException. + </para> + <para> + During its execution, the functions.xq query calls several functions in the + http://exist-db.org/xquery/util module during its execution. + util:registered-modules() is one of these functions. In the code that + performs XQuery function calls, there is a PEP controlling access to function calls. This + PEP generates the appropriate access request, passes it to the PDP, obtains the result, + and allows the method to be called if the PDP allowed the access. + </para> + <para> + This sequence of events occurs for each access to a controlled resource. + </para> + </section> + <section> + <title>XACML Policies</title> + <para>This section describes XACML policies in enough detail to write policies in eXist using + the graphical policy editor in the client. To manually create policies, the level of detail + provided in the specifications (or possibly in a thorough tutorial) is probably required. + A policy has a structure that is represented by the following cropped screenshot from the + graphical editor. + </para> + <screenshot> + <graphic fileref="resources/policy-hierarchy.png"/> + </screenshot> + <para> + A Policy Decision Point (PDP) responds to an access request by finding the unique policy + that applies to that request. It is an error if more than one policy applies or if no + policy applies. The target section of each policy provides the initial information for + determining the applicable policy. + </para> + <section> + <title>The Target Section</title> + <section> + <title>Purpose</title> + <para> + A target is intended to be a simple description of the requests to which its + enclosing policy applies by allowing basic comparisons—such as equals, + greater than, or less than—between an attribute specified in the request and a + given literal value. + </para> + <example> + <title>Making a Policy Apply by the User's Name</title> + <para> + So, for a policy to apply to a request made by the "guest" user, + the semantics of the target section of that policy might be: + </para> + <synopsis>This policy applies if: + the value of the subject attribute "user-name" in the request equals the string constant "guest". + </synopsis> + </example> + <para> + The target section does not allow for more advanced comparisons—such as regular + expression matching, functions, and operators—because it is supposed to be easily + indexable. That is, the target section is intended to be a quick way to decide whether + a particular policy applies to a request. + </para> + </section> + <section> + <title>Usage</title> + <para> + In XACML 1.0/1.1, there are three types of attributes in a target: subject, resource, + and action. XACML 2.0 (currently unsupported) adds environment attributes to this + list. + </para> + <para> + Each attribute type has zero or more attribute groups. If the type has no groups, + it matches all requests. Each attribute in a given group must match the request in + order for that group to match the request. At least one group in an attributes type + must match the request for the type to match the request and each type must match the + request for the target to match. + </para> + <example> + <title>Attribute Groups</title> + <para> + So, to expand upon the previous semantic example, suppose the administrator has two + cases to which he or she wants the policy to apply. The first case is when the + XQuery "delete.xql" is being accessed through the REST-style interface. The second case + is when the Java method "exit" in the class "java.lang.System" is called (from a query) + through the XML:DB interface. Expressed in the target of a policy, the semantics of + the target might be: + </para> + <synopsis>This policy applies if the resource being accessed is: + (an "XQuery main module" named "delete.xql" accessed through the "REST" interface) + OR + (a "Java method" named "exit" in class "java.lang.System" accessed by the "XML:DB" interface). + </synopsis> + <para> + The parentheses are added for clariy and should emphasize that this policy does not + apply to a request to access an XQuery main module named "delete.xql" accessed + through the XML:DB interface. Similarly, it doesn't apply to the Java method name + "currentTimeMillis" in class "java.lang.System" (no matter which interface is + being used to access it). + </para> + </example> + <para> + Restrictions that cross attribute types cannot be completely expressed in a target. + </para> + <example> + <title>Target Limitations</title> + <para> + An example of such a case is if the administrator wants to allow the "xmldb" user to + access resources through the XML:DB interface only and the "cocoon" user to access + resources through the Cocoon interface only. If the administrator attempted to express + these restrictions solely in the target of a policy, its semantics would be something + like: + </para> + <synopsis>This policy applies if: + The subject's name is ("xmldb" or "cocoon") + AND + the interface is ("XML:DB" or "Cocoon"). + </synopsis> + <para> + The parentheses are added for clarity and should help demonstrate that the "cocoon" + user would be allowed access through XML:DB and the "xmldb" user would be allowed + access through Cocoon although this was not intended. + </para> + </example> + </section> + <para> + If the target section of a policy applies to the request, the PDP then evaluates that + policy's rules. + </para> + </section> + <section> + <title>Rules</title> + <para> + Each rule has a target section that has the same purpose and structure + as the target section of a policy (to determine if the rule applies to a request). A + rule has an additional section that allows for more advanced comparisons than the + target section. Its purpose is also to determine if the rule applies to a request. + A rule applies to a request if both its target and condition section apply to a request. + </para> + <para> + The condition section is essentially a functional language. Functions operate on + the results of other functions, literal values, and attributes from the request. There + are no side effects to function calls and the final result is a boolean value + indicating whether or not the rule applies to the request. + </para> + <para> + A rule has a defined effect when it applies to a request. Valid effects are Deny and + Permit. + </para> + <para> + To make the decision on the request, the PDP uses the policy's rule-combining + algorithm. For each policy, a rule combining algorithm determines how the rules + of a policy determine the overall result of the policy. There are several rule + combining algorithms defined in XACML (custom ones may be defined). Brief + descriptions are listed below. For the official definitions, see the XACML + specifications. + </para> + <para> + In all cases, if none of the rules apply, the policy does not apply. + </para> + <varlistentry> + <term>First Applicable</term> + <listitem> + <para> + The effect of the first rule that applies is the decision of the policy. + The rules must be evaluated in the order that they are listed in the + policy. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Only One Applicable</term> + <listitem> + <para> + Only one rule will be applicable (an error occurs otherwise). The effect + of the applicable rule is the decision of the policy. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Deny Overrides</term> + <listitem> + <para> + If any rule denies access, the policy denies access. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Ordered Deny Overrides</term> + <listitem> + <para> + This algorithm is identical to Deny Overrides except that it + requires that the rules in a policy be evalutated in the order that + they are listed in the policy. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Permit Overrides</term> + <listitem> + <para> + If any rule permits access, the policy permits access. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Ordered Permit Overrides</term> + <listitem> + <para> + This algorithm is identical to Permit Overrides except that it + requires that the rules in a policy be evalutated in the order that + they are listed in the policy. + </para> + </listitem> + </varlistentry> + <note> + <para> + Sun's XACML Implementation (the XACML implementation used in eXist) + currently treats the ordered and unordered variants identically. + </para> + </note> + </section> + <section> + <title>Policy Summary</title> + <para> + To summarize the contents of a Policy, a Policy contains a Target and Rules. + A Rule contains a Target and a Condition. A Rule applies to a request if + both its Target and Condition match the request. A Policy applies to a + request if its Target matches the request and at least one of its Rules + applies to the request. The decision of an applicable Policy is the result + of applying its rule-combining algorithm to its Rules. + </para> + </section> + </section> + <section> + <title>Sun's XACML Implementation</title> + <para>As the section title suggests, Sun developed an implementation of XACML in Java + called Sun's XACML Implementation. It is open source and is hosted at SourceForge: + <ulink href="http://sunxacml.sourceforge.net/">http://sunxacml.sourceforge.net/</ulink>. + eXist uses this implementation to construct and evaluate access requests according to + the policies provided by the database administrator. In general, you don't need to know + much about Sun's implementation unless you want to use XACML outside of eXist. That is, + if you will be enforcing policies in your application and making your own requests. + The Policy Decision Point (PDP) in Sun's implementation should theoretically be a black + box to which you provide policies, eXist provides an access request, and it tells + you if that access is allowed. + </para> + <note> + <para>eXist uses version 1.2 of sunxacml. This is the latest official release, + supporting XACML 1.0/1.1. More recent CVS versions are supporting more and more + of XACML 2.0. When a new release of sunxacml is made we will likely look into + upgrading so that XACML 2.0 and its improvements are supported. + </para> + </note> + <para>Sun, Sun Microsystems, and Java are trademarks or registered trademarks of + Sun Microsystems, Inc. in the U.S. and other countries. + </para> + </section> + </chapter> +</book> \ No newline at end of file Added: trunk/eXist-1.0/webapp/xacml-usage.xml =================================================================== --- trunk/eXist-1.0/webapp/xacml-usage.xml (rev 0) +++ trunk/eXist-1.0/webapp/xacml-usage.xml 2006-03-29 22:55:46 UTC (rev 3006) @@ -0,0 +1,149 @@ +<?xml version="1.0"?> +<!--<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd">--> + +<book xmlns:ci="http://apache.org/cocoon/include/1.0"> + + <bookinfo> + <graphic fileref="logo.jpg"/> + <title>Open Source Native XML Database</title> + <author> + <firstname>Mark</firstname> + <surname>Harrah</surname> + <affiliation> + <address format="linespecific"> + <email>ha...@um...</email> + </address> + </affiliation> + </author> + </bookinfo> + + <ci:include src="sidebar.xml"/> + + <chapter> + <title>Access Control in eXist: Using XACML in eXist</title> + <section> + <title>Configuring XACML</title> + <para>eXist loads policies from the /db/system/policies collection. Policies may be + manually created and uploaded to the policies collection, however, the builtin editor + is recommended.</para> + <para>Policies currently have a range index defined on their ids for possible lookup for policy + references. There is a fulltext index only on Description elements. However, in the + future, more indices might be defined in order to more efficiently restrict the possible + policies applicable to a request. This information may be important if an administrator + executes a query on the root or system collection that includes all subcollections. + </para> + <para>By default, access control through XACML is disabled. To enable it, add + <synopsis><xacml enable="yes"/></synopsis> to conf.xml. When + XACML is enabled and no policies exist, it loads default policies. These policies generally + allow as little access as necessary in order to run the examples and the unit tests. + This behavior may be disabled by adding the attribute 'load-defaults' and setting it to 'no'. + <synopsis><xacml enable="yes" load-defaults="no"/></synopsis> + </para> + </section> + <section> + <title>Managing XACML Policies</title> + <para> + The administrator is responsible for providing policies that define the controls on + access. This section describes how to manage policies in eXist. + </para> + <para> + All policies are stored in the /db/system/policies collection. The graphical editor + will place all generated policies here. If you manually create your policies, you should + put them here as well. If there are no policies in the policies collection when the XACML + subsystem is initialized and the load-defaults attribute in the xacml element in the + configuration file has not been set to "no", the default policies are loaded into the + policies collection. There is nothing special about these policies once loaded: they are + treated like any other policy and can be edited or removed. + </para> + <section> + <title>Opening the Graphical Editor</title> + <para> + To edit policies using the graphical editor, enable XACML as described in the previous + section. Start the graphical client. The policy editor is displayed by selecting + Tools->Edit Policies. If XACML is not enabled, you will see the following error + message: + </para> + <screenshot> + <graphic fileref="resources/policy-editor_disabled.png"/> + </screenshot> + <para> + Once the editor is displayed, it should look like the following screenshot. (The + window was resized to remove excess empty space in the screenshot and will be + larger in practice.) + </para> + <screenshot> + <graphic fileref="resources/policy-editor_initial.png"/> + </screenshot> + </section> + <section> + <title>Basic Policy Editing</title> + <para> + The left side of the split pane in the previous screenshot contains a tree + structure with all of the policy documents in the /db/system/policies + collection as the first level nodes. The immediate children of a policy + are its target and rules. A target node has no children. A rule node + has target and condition child nodes. + </para> + <note> + <para> + The editor for condition nodes is not yet implemented. + </para> + </note> + <para> + The policy hierarchy is reflected in the next screenshot. + </para> + <screenshot> + <graphic fileref="resources/policy-editor_policy.png"/> + </screenshot> + <para> + Here, the policy with ID 'BuiltinPolicy' has been selected. The right side of the + split pane displays editable information about the policy. The ID should be unique + among all top level policies (this is not currently enforced by the editor). The + description should provide a brief overview of what restrictions the policy is + supposed to provide. + </para> + <para>Any changes to the information on the right side marks the policy as modified. + This is indicated by a darker background for the node on the left side. + </para> + </section> + <section> + <title>Editing a Target</title> + <para> + The graphical editor represents the Target section as a table for each type of + attribute. The different types are tabs in a tabbed pane. The next screenshot + shows the Resource section selected. The table associated with each attribute + type represents a group of attributes as a row. Every attribute in this row + must match a request for the row to match the request and at least one row must + match the request in order for the type (Subject, Resource, or Action) to match + the request. Each type must match the request for the whole Target to match + the request. + </para> + <screenshot> + <graphic fileref="resources/policy-editor_target.png"/> + </screenshot> + <para> + If the comparison for an attribute is unspecified, all requests will match that + attribute. To edit the comparison for an attribute, select the desired cell. + As shown in the following screenshot, the cell editor is displayed above the + table. The cell editor shows the name of the attribute being edited and its + data type. The first drop down list selects the comparison. The second drop + down list selects the value against which the attribute should be compared. + </para> + <screenshot> + <graphic fileref="resources/policy-editor_target2.png"/> + </screenshot> + <para> + In this case, the "module-namespace" attribute allows the namespace to be + typed in or the XPath functions namespace may be selected from the drop down + list. + </para> + <para> + TODO: finish Target section + </para> + </section> + <para> + TODO: finish Managing Policies section + </para> + </section> + </chapter> +</book> \ No newline at end of file Modified: trunk/eXist-1.0/webapp/xacml.xml =================================================================== --- trunk/eXist-1.0/webapp/xacml.xml 2006-03-29 22:45:18 UTC (rev 3005) +++ trunk/eXist-1.0/webapp/xacml.xml 2006-03-29 22:55:46 UTC (rev 3006) @@ -2,11 +2,11 @@ <!--<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd">--> <book xmlns:ci="http://apache.org/cocoon/include/1.0"> - + <bookinfo> <graphic fileref="logo.jpg"/> <title>Open Source Native XML Database</title> - <author> + <author> <firstname>Mark</firstname> <surname>Harrah</surname> <affiliation> @@ -18,7 +18,7 @@ </bookinfo> <ci:include src="sidebar.xml"/> - + <chapter> <title>Access Control in eXist</title> <para> @@ -26,181 +26,52 @@ <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml"> eXtensible Access Control Markup Language (XACML) </ulink> - for XQuery access control. + for XQuery access control. XACML + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml#XACML11"> + 1.1 + </ulink> + and + <ulink href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xacml#XACML10"> + 1.0 + </ulink> + are currently supported. </para> - <section> - <title>Capabilities</title> - <para> - This provides an overview of what may currently be controlled using - XACML policies in eXist. - </para> - - <section> - <title>Subjects</title> - <section> - <title>User</title> - <para> - All access may be restricted by the user initiating access to a resource, - currently XQueries. The user's name and the names of the groups of which - the user is a member may be used to control access to any of the supported - resources mentioned below. - </para> - </section> - <section> - <title>Intermediaries</title> - <para> - There is no support yet for access control based on the route taken to the - resource. This type of control allows a user to use a library module - library.xqm by running query.xql but not through a query passed directly - in the HTTP request. This support is planned but not a high priority. - </para> - </section> - </section> - <section> - <title>Resources</title> - <para> - All XQuery modules may be controlled by their source. A - source has a type (Cocoon, URL, Class, File, Database, String, or - class loader resource) and a key. The key is specific to the source. For - URLs, class loader resources, and Cocoon, the key is the URI or URL of the - source. - </para> - <itemizedlist> - <listitem> - <para> - A String source comes from directly passed queries. This may occur - externally through the REST-style interface or XML:DB or eXist may - internally execute queries directly. The key is "String" for every - String source. This source is only used for main modules. - </para> - </listitem> - <listitem> - <para> - A source of type File comes directly from the filesystem. The key is the - absolute path to the file. External library modules or main modules may - have this source type. - </para> - </listitem> - <listitem> - <para> - A source of type Database is stored in the database. The key is the absolute - path to the resource (such as /db/test/test.xqm). External library modules or - main modules may have this source type. - </para> - </listitem> - <listitem> - <para> - Cocoon sources are sources requested from a Cocoon context. The key is the - URI to the resource. Main modules may have this source type. - </para> - </listitem> - <listitem> - <para> - Class sources are sources that are Java classes. The key is the fully - qualified name of the class. These will always be the type of internal - library modules and reflective access to Java methods. - </para> - </listitem> - <listitem> - <para> - URL sources have as the key the URL. External library modules or main modules - may have this source type. - </para> - </listitem> - <listitem> - <para> - Class loader sources are those resources found by the class loader. The key is - the path to the resource. External library modules or main modules may have this - source type. - </para> - </listitem> - </itemizedlist> - <section> - <title>Java Reflection</title> - <para> - Invocation of Java methods by reflection may be restricted by class and - method name. - </para> - </section> - <section> - <title>Internal XQuery Library Modules</title> - <para> - Calls to XQuery functions in modules written in Java may be restricted - by the name of the implementing module's class, the module's namespace URI, - and the name of the function. - </para> - </section> - <section> - <title>External XQuery Library Modules</title> - <para> - Calls to XQuery functions in library modules stored in the - database or the file system may be restricted by namespace URI, function name, - and module source. - </para> - </section> - <section> - <title>XQuery Main Modules</title> - <para> - Query execution may be controlled by the source of the query. - </para> - </section> - <note> - <para>Overloaded Java methods and XQuery functions share the same access - control settings. - </para> - </note> - </section> - <section> - <title>Environment</title> - <para> - Access may be controlled based on the method of access. The following are - direct access contexts: REST, XML:DB (local), XML-RPC, WebDAV, and SOAP. - Additionally, some contexts are indirectly used: eXist internally executes - queries for validation, triggers may execute queries, and XInclude expansion - requries evaluation of a query. There is also a context for unit tests - when they directly access the query classes without going through one - of the above interfaces. - </para> - </section> - </section> - <section> - <title>XACML Configuration</title> - <para>eXist loads policies from the /db/system/policies collection. Policies may be - manually created and uploaded to the policies collection, however, the builtin editor - is recommended.</para> - <para>Policies currently have a range index defined on their ids for possible lookup for policy - references. There is a fulltext index only on Description elements. However, in the - future, more indices might be defined in order to more efficiently restrict the possible - policies applicable to a request. This information may be important if an administrator - executes a query on the root or system collection that includes all subcollections. - </para> - <para>By default, access control through XACML is disabled. To enable it, add - <synopsis><xacml enable="yes"/></synopsis> to conf.xml. When - XACML is enabled and no policies exist, it loads default policies. This behavior - may be disabled by adding the attribute 'load-defaults' and setting it to 'no'. - <synopsis><xacml enable="yes" load-defaults="no"/></synopsis> - </para> - </section> - <section> - <title>XACML Background Information</title> - <section> - <title>The XACML Standard</title> - <para>The eXtensible Access Control Markup Language is an OASIS standard for restricting - access to resources. TODO: complete section - </para> - </section> - <section> - <title>Sun's XACML Implementation</title> - <para>As the section title suggests, Sun developed an implementation of XACML in Java - called Sun's XACML Implementation. It is open source and is hosted at SourceForge: - <ulink href="http://sunxacml.sourceforge.net/">http://sunxacml.sourceforge.net/</ulink>. - eXist uses this implementation to construct and evaluate access requests. - TODO: complete section - </para> - <para>Sun, Sun Microsystems, and Java are trademarks or registered trademarks of - Sun Microsystems, Inc. in the U.S. and other countries. - </para> - </section> - </section> + <para> + This documentation is divided into four parts. The first part of this + documentation, <ulink href="xacml-features.xml">Capabilities</ulink>, + is intended to be a thorough overview of what in eXist is + controlled using XACML. This part does not require prior knowledge of + XACML and should provide the database administrator with enough information + to decide whether to enable and use eXist's XACML subsystem. + </para> + <para> + The second part, <ulink href="xacml-intro.xml">Introduction to XACML</ulink>, is a + brief introduction to XACML. The targeted level of detail is the level + necessary to use eXist's policy editor to manage policies (policies + are how access is restricted in XACML). It also provides some background + information on the XACML implementation library used by eXist. + </para> + <para>The third part, <ulink href="xacml-usage.xml">Using XACML in eXist</ulink> + includes a short description of how to configure the XACML subsystem in eXist. + This covers enabling XACML, the location of policies, and the default behavior + of the XACML subsystem. This part then describes how to create, edit, and remove + policies in eXist using the graphical editor. + </para> + <para> + The last part of the documentation, + <ulink href="xacml-dev.xml">XACML Developer's Guide</ulink>, + is targeted towards eXist developers and describes how to implement a Policy + Enforcement Point (PEP) in eXist, among other topics. + </para> + <para> + A basic description of the operation of access control using XACML in eXist is + the that database administrator writes policies (either manually or with the + graphical editor) that determine who can access what resources and when and how + those resources can be accessed. When an XQuery is executed (or some other + controlled resource is accessed), eXist asks Sun's XACML Implementation if that + action is permitted according to the provided policies. If access is denied, a + PermissionDeniedException is thrown. If it is granted, program execution + continues normally. + </para> </chapter> </book> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-29 22:45:27
|
Revision: 3005 Author: brihaye Date: 2006-03-29 14:45:18 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3005&view=rev Log Message: ----------- Fixed "$" escaping in HTML URIs. Second pass. Thanks to Stephan Moritz Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java Modified: trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java 2006-03-29 22:32:34 UTC (rev 3004) +++ trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java 2006-03-29 22:45:18 UTC (rev 3005) @@ -461,23 +461,6 @@ } } - public void testEscapeHtmlUri() { - ResourceSet result = null; - String r = ""; - String string; - String expected; - String query; - try { - query = "escape-html-uri('$')"; - result = service.query(query); - r = (String) result.getResource(0).getContent(); - assertEquals("$", r); - } catch (XMLDBException e) { - System.out.println("testEscapeHtmlUri(): " + e); - fail(e.getMessage()); - } - } - public void testEncodeForURI() { ResourceSet result = null; String r = ""; @@ -531,7 +514,15 @@ query = "iri-to-uri(\"" + string + "\")"; result = service.query(query); r = (String) result.getResource(0).getContent(); - assertEquals(expected, r); + assertEquals(expected, r); + + string = "$"; + expected = "$"; + query = "iri-to-uri(\"" + string + "\")"; + result = service.query(query); + r = (String) result.getResource(0).getContent(); + assertEquals(expected, r); + } catch (XMLDBException e) { System.out.println("testIRIToURI(): " + e); fail(e.getMessage()); @@ -559,6 +550,11 @@ r = (String) result.getResource(0).getContent(); assertEquals(expected, r); + query = "escape-html-uri('$')"; + result = service.query(query); + r = (String) result.getResource(0).getContent(); + assertEquals("$", r); + } catch (XMLDBException e) { System.out.println("EscapeHTMLURI(): " + e); fail(e.getMessage()); Modified: trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java 2006-03-29 22:32:34 UTC (rev 3004) +++ trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java 2006-03-29 22:45:18 UTC (rev 3005) @@ -68,7 +68,7 @@ result = result.replaceAll("%26", "&"); result = result.replaceAll("%3D", "="); result = result.replaceAll("%2B", "+"); - result = result.replaceAll("%24", "$"); + result = result.replaceAll("%24", "\\$"); result = result.replaceAll("%2C", ","); result = result.replaceAll("%5B", "["); result = result.replaceAll("%5D", "])"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-29 22:32:42
|
Revision: 3004 Author: brihaye Date: 2006-03-29 14:32:34 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3004&view=rev Log Message: ----------- Fixed "$" escaping in HTML URIs Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java Modified: trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java 2006-03-29 22:03:56 UTC (rev 3003) +++ trunk/eXist-1.0/src/org/exist/xquery/test/XQueryFunctionsTest.java 2006-03-29 22:32:34 UTC (rev 3004) @@ -461,6 +461,22 @@ } } + public void testEscapeHtmlUri() { + ResourceSet result = null; + String r = ""; + String string; + String expected; + String query; + try { + query = "escape-html-uri('$')"; + result = service.query(query); + r = (String) result.getResource(0).getContent(); + assertEquals("$", r); + } catch (XMLDBException e) { + System.out.println("testEscapeHtmlUri(): " + e); + fail(e.getMessage()); + } + } public void testEncodeForURI() { ResourceSet result = null; Modified: trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java 2006-03-29 22:03:56 UTC (rev 3003) +++ trunk/eXist-1.0/src/org/exist/xquery/util/URIUtils.java 2006-03-29 22:32:34 UTC (rev 3004) @@ -98,7 +98,7 @@ result = result.replaceAll("%26", "&"); result = result.replaceAll("%3D", "="); result = result.replaceAll("%2B", "+"); - result = result.replaceAll("%24", "$"); + result = result.replaceAll("%24", "\\$"); result = result.replaceAll("%2C", ","); result = result.replaceAll("%5B", "["); result = result.replaceAll("%5D", "])"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-03-29 22:04:03
|
Revision: 3003 Author: brihaye Date: 2006-03-29 14:03:56 -0800 (Wed, 29 Mar 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3003&view=rev Log Message: ----------- Fixed incorrect term offsets in full text indexer Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/storage/NativeTextEngine.java Modified: trunk/eXist-1.0/src/org/exist/storage/NativeTextEngine.java =================================================================== --- trunk/eXist-1.0/src/org/exist/storage/NativeTextEngine.java 2006-03-29 21:14:48 UTC (rev 3002) +++ trunk/eXist-1.0/src/org/exist/storage/NativeTextEngine.java 2006-03-29 22:03:56 UTC (rev 3003) @@ -770,7 +770,7 @@ //Create a GIDs list if (list == null) { list = new OccurrenceList(); - list.add(gid, token.startOffset() - text.startOffset()); + list.add(gid, token.startOffset()); words[0].put(token.getText(), list); } else { //Add node's GID to the list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |