Merge lp:~zorba-coders/zorba/fix_xqdoc_schema_import_prefix into lp:zorba
- fix_xqdoc_schema_import_prefix
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Matthias Brantner |
Approved revision: | 10724 |
Merged at revision: | 10722 |
Proposed branch: | lp:~zorba-coders/zorba/fix_xqdoc_schema_import_prefix |
Merge into: | lp:zorba |
Diff against target: |
162 lines (+30/-14) 9 files modified
modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq (+1/-1) src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+21/-1) test/rbkt/ExpQueryResults/zorba/xqdoc/basic.xml.res (+1/-1) test/rbkt/ExpQueryResults/zorba/xqdoc/content.xml.res (+1/-1) test/rbkt/ExpQueryResults/zorba/xqdoc/indentation.xml.res (+1/-2) test/rbkt/ExpQueryResults/zorba/xqdoc/local.xml.res (+1/-1) test/rbkt/ExpQueryResults/zorba/xqdoc/no_global_var.xml.res (+1/-2) test/rbkt/ExpQueryResults/zorba/xqdoc/testSchemaTypes.xml.res (+1/-2) test/rbkt/ExpQueryResults/zorba/xqdoc/unorderedAnnotations.xml.res (+2/-3) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/fix_xqdoc_schema_import_prefix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sorin Marian Nasoi | Approve | ||
Matthias Brantner | Needs Information | ||
Chris Hillery | Approve | ||
Review via email: mp+97708@code.launchpad.net |
Commit message
Fixed a namespace clash by adding a "-schema" to the import schema prefix.
Description of the change
Fixed a namespace clash by adding a "-schema" to the import schema prefix.
Sorin Marian Nasoi (sorin.marian.nasoi) : | # |
Sorin Marian Nasoi (sorin.marian.nasoi) wrote : | # |
> The change looks good. One question: is using the same prefix that the
> original module used likely to cause any conflicts? Are those prefixes
> generally unique as well as the module prefixes?
I think that that is what Dana meant by suggesting uniformity: as a result I have added bug lp:956318.
If you are OK with this answer please set the status of this merge to 'Approve' such that the Validation Queue is able to pick it up.
Thanks.
Chris Hillery (ceejatec) wrote : | # |
Sounds reasonable.
Matthias Brantner (matthias-brantner) wrote : | # |
Does this also work for schema imports without a prefix?
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/fix_xqdoc_schema_import_prefix into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job
fix_xqdoc_
final status was:
7 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
- 10724. By Sorin Marian Nasoi <email address hidden>
-
Corrected the expected result of the XQDoc tests that are different because of the change in the xqdoc printer.
Sorin Marian Nasoi (sorin.marian.nasoi) wrote : | # |
> Does this also work for schema imports without a prefix?
Are you referring to:
import schema default element namespace "SOMETHING"; ?
The answer would be no, the current changes are not tested for this because we have no modules at this point using this kind of schema imports.
The xqdoc printer would have to be updated and also the xqdoc2html converter in order to support this.
IMHO this should not be a show stopper for these changes: If you agree please create a lp bug for me for this feature and approve this merge.
Sorin Marian Nasoi (sorin.marian.nasoi) : | # |
Matthias Brantner (matthias-brantner) wrote : | # |
> > Does this also work for schema imports without a prefix?
> Are you referring to:
> import schema default element namespace "SOMETHING"; ?
>
> The answer would be no, the current changes are not tested for this because we
> have no modules at this point using this kind of schema imports.
>
> The xqdoc printer would have to be updated and also the xqdoc2html converter
> in order to support this.
>
> IMHO this should not be a show stopper for these changes: If you agree please
> create a lp bug for me for this feature and approve this merge.
Yes, that's what I mean. It looks like the xqdoc visitor could crash with this change. That's why I think the branch shouldn't be merged before it's tested.
Sorin Marian Nasoi (sorin.marian.nasoi) wrote : | # |
> > > Does this also work for schema imports without a prefix?
> > Are you referring to:
> > import schema default element namespace "SOMETHING"; ?
> >
> > The answer would be no, the current changes are not tested for this because
> we
> > have no modules at this point using this kind of schema imports.
> >
> > The xqdoc printer would have to be updated and also the xqdoc2html converter
> > in order to support this.
> >
> > IMHO this should not be a show stopper for these changes: If you agree
> please
> > create a lp bug for me for this feature and approve this merge.
> Yes, that's what I mean. It looks like the xqdoc visitor could crash with this
> change. That's why I think the branch shouldn't be merged before it's tested.
Nope, I disagree: this merge does not introduce the problem you mentioned because it was already there :)
All this change did was to make you and then me aware that we have a problem if one uses a schema import without a prefix.
So my suggestion is: please open a bug for this issue and approve this merge.
Dana Florescu (dflorescu) wrote : | # |
>>>
>> Yes, that's what I mean. It looks like the xqdoc visitor could crash with this
>> change. That's why I think the branch shouldn't be merged before it's tested.
> Nope, I disagree: this merge does not introduce the problem you mentioned because it was already there :)
I agree with Sorin. The problem was there already.
I think Sorin should go ahead and commit the change (at least the documentation will be usable..)
and then file a bug for the existing problem, and fix that after the release.
Thanks
Dana
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job fix_xqdoc_
All tests succeeded!
Preview Diff
1 | === modified file 'modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq' |
2 | --- modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq 2012-03-09 06:57:41 +0000 |
3 | +++ modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq 2012-03-15 22:38:22 +0000 |
4 | @@ -1263,7 +1263,7 @@ |
5 | for $import in $xqdoc/xqdoc:imports//xqdoc:import[@type = "schema"] |
6 | return |
7 | concat('import schema namespace ', |
8 | - $namespaces//xqdoc:namespace[@uri = $import/xqdoc:uri/text()][1]/@prefix, |
9 | + $namespaces//xqdoc:namespace[(@uri = $import/xqdoc:uri/text()) and (@isSchema = "true")]/@prefix, |
10 | ' = "', |
11 | string($import/xqdoc:uri/text()),'";')," |
12 | ") |
13 | |
14 | === modified file 'src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp' |
15 | --- src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp 2012-02-28 20:45:43 +0000 |
16 | +++ src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp 2012-03-15 22:38:22 +0000 |
17 | @@ -167,11 +167,18 @@ |
18 | } |
19 | } |
20 | |
21 | +bool is_namespace_schema(zstring aPrefix, zstring aNamespace ) |
22 | +{ |
23 | + map<zstring, zstring>::iterator ite = theNamespaceSchemaMap.find(aPrefix); |
24 | + return ((ite != theNamespaceSchemaMap.end()) || |
25 | + (ite->second == aNamespace)); |
26 | +} |
27 | + |
28 | void print_namespaces() |
29 | { |
30 | store::Item_t lTypeName; |
31 | store::Item_t lNamespaceQName, lCustomElem; |
32 | - store::Item_t lPrefixQName, lURIQName; |
33 | + store::Item_t lPrefixQName, lURIQName, lIsSchemaQName; |
34 | store::Item_t lNamespace, lAttrValue; |
35 | bool lFirst = true; |
36 | |
37 | @@ -214,6 +221,9 @@ |
38 | lPrefixQName, "", "", "prefix"); |
39 | theFactory->createQName( |
40 | lURIQName, "", "", "uri"); |
41 | + theFactory->createQName( |
42 | + lIsSchemaQName, "", "", "isSchema"); |
43 | + |
44 | |
45 | lTypeName = GENV_TYPESYSTEM.XS_UNTYPED_QNAME; |
46 | theFactory->createElementNode( |
47 | @@ -232,6 +242,12 @@ |
48 | theFactory->createAttributeNode( |
49 | lURIQName, lNamespace, lURIQName, lTypeName, lAttrValue); |
50 | |
51 | + bool lIsSchema = is_namespace_schema(lIter->first, lIter->second); |
52 | + lTmp = lIsSchema?"true":"false"; |
53 | + theFactory->createString(lAttrValue, lTmp); |
54 | + lTypeName = GENV_TYPESYSTEM.XS_UNTYPED_QNAME; |
55 | + theFactory->createAttributeNode( |
56 | + lIsSchemaQName, lNamespace, lIsSchemaQName, lTypeName, lAttrValue); |
57 | } |
58 | } |
59 | |
60 | @@ -434,6 +450,9 @@ |
61 | // prefix -> uri |
62 | map<zstring, zstring> theNamespaceMap; |
63 | |
64 | + // prefix -> uri for the schema imports |
65 | + map<zstring, zstring> theNamespaceSchemaMap; |
66 | + |
67 | const char* theXQDocNS; |
68 | const char* theXQDocPrefix; |
69 | |
70 | @@ -1034,6 +1053,7 @@ |
71 | lPrefix = n.get_prefix()->get_prefix(); |
72 | } |
73 | theNamespaceMap[lPrefix] = n.get_uri(); |
74 | + theNamespaceSchemaMap[lPrefix] = n.get_uri(); |
75 | } |
76 | |
77 | XQDOC_NO_BEGIN_TAG (NamespaceDecl) |
78 | |
79 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/basic.xml.res' |
80 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/basic.xml.res 2012-02-28 20:45:43 +0000 |
81 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/basic.xml.res 2012-03-15 22:38:22 +0000 |
82 | @@ -1,7 +1,7 @@ |
83 | <xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>http://www.28msec.com/modules/gdata</xqdoc:uri><xqdoc:name>gdata.xqlib</xqdoc:name><xqdoc:comment><xqdoc:description> The description of this module must have the whitespaces |
84 | normalized: 1) NL at top, middle & end; 2) TABs in this |
85 | line; 3) SPACES here and after. |
86 | -</xqdoc:description><xqdoc:see>http://example.com</xqdoc:see></xqdoc:comment><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="atom" uri="http://www.w3.org/2005/Atom"/><xqdoc:namespace prefix="atompub" uri="http://www.28msec.com/modules/atom"/><xqdoc:namespace prefix="gdata" uri="http://www.28msec.com/modules/gdata"/><xqdoc:namespace prefix="rest" uri="http://www.zorba-xquery.com/zorba/rest-functions"/><xqdoc:namespace prefix="zorba" uri="http://www.zorba-xquery.com/zorba/internal-functions"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.w3.org/2005/Atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/internal-functions</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.28msec.com/modules/atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/rest-functions</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables><xqdoc:variable><xqdoc:uri>gdata:version</xqdoc:uri><xqdoc:comment><xqdoc:description> Import the Atom XML Schema |
87 | +</xqdoc:description><xqdoc:see>http://example.com</xqdoc:see></xqdoc:comment><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="atom" uri="http://www.w3.org/2005/Atom" isSchema="true"/><xqdoc:namespace prefix="atompub" uri="http://www.28msec.com/modules/atom" isSchema="false"/><xqdoc:namespace prefix="gdata" uri="http://www.28msec.com/modules/gdata" isSchema="false"/><xqdoc:namespace prefix="rest" uri="http://www.zorba-xquery.com/zorba/rest-functions" isSchema="false"/><xqdoc:namespace prefix="zorba" uri="http://www.zorba-xquery.com/zorba/internal-functions" isSchema="false"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.w3.org/2005/Atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/internal-functions</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.28msec.com/modules/atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/rest-functions</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables><xqdoc:variable><xqdoc:uri>gdata:version</xqdoc:uri><xqdoc:comment><xqdoc:description> Import the Atom XML Schema |
88 | </xqdoc:description><xqdoc:see>http://www.kbcafe.com/rss/atom.xsd.xml</xqdoc:see></xqdoc:comment></xqdoc:variable><xqdoc:variable><xqdoc:uri>gdata:id</xqdoc:uri><xqdoc:comment><xqdoc:description> Google ID |
89 | </xqdoc:description><xqdoc:see>http://www.google.com</xqdoc:see></xqdoc:comment></xqdoc:variable><xqdoc:variable><xqdoc:uri>gdata:authToken</xqdoc:uri></xqdoc:variable><xqdoc:variable><xqdoc:uri>gdata:blub</xqdoc:uri><xqdoc:comment><xqdoc:description> test xqdoc generation for a variable declaration |
90 | whose initializer invokes a function |
91 | |
92 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/content.xml.res' |
93 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/content.xml.res 2012-02-28 20:45:43 +0000 |
94 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/content.xml.res 2012-03-15 22:38:22 +0000 |
95 | @@ -1,7 +1,7 @@ |
96 | <xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>http://www.28msec.com/modules/gdata</xqdoc:uri><xqdoc:name></xqdoc:name><xqdoc:comment><xqdoc:description> The description of this module must have the whitespaces |
97 | normalized: 1) NL at top, middle & end; 2) TABs in this |
98 | line; 3) SPACES here and after. |
99 | -</xqdoc:description><xqdoc:see>http://example.com</xqdoc:see></xqdoc:comment><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="atom" uri="http://www.w3.org/2005/Atom"/><xqdoc:namespace prefix="atompub" uri="http://www.28msec.com/modules/atom"/><xqdoc:namespace prefix="gdata" uri="http://www.28msec.com/modules/gdata"/><xqdoc:namespace prefix="rest" uri="http://www.zorba-xquery.com/zorba/rest-functions"/><xqdoc:namespace prefix="zorba" uri="http://www.zorba-xquery.com/zorba/internal-functions"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.w3.org/2005/Atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/internal-functions</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.28msec.com/modules/atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/rest-functions</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables><xqdoc:variable><xqdoc:uri>gdata:version</xqdoc:uri><xqdoc:comment><xqdoc:description> Import the Atom XML Schema |
100 | +</xqdoc:description><xqdoc:see>http://example.com</xqdoc:see></xqdoc:comment><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="atom" uri="http://www.w3.org/2005/Atom" isSchema="true"/><xqdoc:namespace prefix="atompub" uri="http://www.28msec.com/modules/atom" isSchema="false"/><xqdoc:namespace prefix="gdata" uri="http://www.28msec.com/modules/gdata" isSchema="false"/><xqdoc:namespace prefix="rest" uri="http://www.zorba-xquery.com/zorba/rest-functions" isSchema="false"/><xqdoc:namespace prefix="zorba" uri="http://www.zorba-xquery.com/zorba/internal-functions" isSchema="false"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.w3.org/2005/Atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/internal-functions</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.28msec.com/modules/atom</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/zorba/rest-functions</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables><xqdoc:variable><xqdoc:uri>gdata:version</xqdoc:uri><xqdoc:comment><xqdoc:description> Import the Atom XML Schema |
101 | </xqdoc:description><xqdoc:see>http://www.kbcafe.com/rss/atom.xsd.xml</xqdoc:see></xqdoc:comment></xqdoc:variable><xqdoc:variable><xqdoc:uri>gdata:id</xqdoc:uri><xqdoc:comment><xqdoc:description> Google ID |
102 | </xqdoc:description><xqdoc:see>http://www.google.com</xqdoc:see></xqdoc:comment></xqdoc:variable><xqdoc:variable><xqdoc:uri>gdata:authToken</xqdoc:uri></xqdoc:variable><xqdoc:variable><xqdoc:uri>gdata:blub</xqdoc:uri><xqdoc:comment><xqdoc:description> test xqdoc generation for a variable declaration |
103 | whose initializer invokes a function |
104 | |
105 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/indentation.xml.res' |
106 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/indentation.xml.res 2011-08-04 02:14:56 +0000 |
107 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/indentation.xml.res 2012-03-15 22:38:22 +0000 |
108 | @@ -1,4 +1,3 @@ |
109 | -<?xml version="1.0" encoding="UTF-8"?> |
110 | <xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"> |
111 | <xqdoc:control> |
112 | <xqdoc:date/> |
113 | @@ -7,7 +6,7 @@ |
114 | <xqdoc:module type="main"> |
115 | <xqdoc:uri>indentation.xq</xqdoc:uri> |
116 | <xqdoc:custom tag="namespaces"> |
117 | - <xqdoc:namespace prefix="xqd" uri="http://www.zorba-xquery.com/modules/xqdoc"/> |
118 | + <xqdoc:namespace prefix="xqd" uri="http://www.zorba-xquery.com/modules/xqdoc" isSchema="false"/> |
119 | </xqdoc:custom> |
120 | </xqdoc:module> |
121 | <xqdoc:imports> |
122 | |
123 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/local.xml.res' |
124 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/local.xml.res 2012-02-28 20:45:43 +0000 |
125 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/local.xml.res 2012-03-15 22:38:22 +0000 |
126 | @@ -1,1 +1,1 @@ |
127 | -<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="main"><xqdoc:uri>local.xqlib</xqdoc:uri><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="ann" uri="http://www.zorba-xquery.com/annotations"/><xqdoc:namespace prefix="xqd" uri="http://www.zorba-xquery.com/modules/xqdoc"/><xqdoc:namespace prefix="xqds" uri="http://www.xqdoc.org/1.0"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.xqdoc.org/1.0</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/modules/xqdoc</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables/><xqdoc:functions><xqdoc:function arity="1"><xqdoc:name>local:remove-date</xqdoc:name><xqdoc:annotations><xqdoc:annotation namespace="http://www.zorba-xquery.com/annotations" localname="sequential" value=""/></xqdoc:annotations><xqdoc:signature>declare %ann:sequential function local:remove-date($xqdoc)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>xqdoc</xqdoc:name></xqdoc:parameter></xqdoc:parameters></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
128 | +<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="main"><xqdoc:uri>local.xqlib</xqdoc:uri><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="ann" uri="http://www.zorba-xquery.com/annotations" isSchema="false"/><xqdoc:namespace prefix="xqd" uri="http://www.zorba-xquery.com/modules/xqdoc" isSchema="false"/><xqdoc:namespace prefix="xqds" uri="http://www.xqdoc.org/1.0" isSchema="true"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.xqdoc.org/1.0</xqdoc:uri></xqdoc:import><xqdoc:import type="library"><xqdoc:uri>http://www.zorba-xquery.com/modules/xqdoc</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables/><xqdoc:functions><xqdoc:function arity="1"><xqdoc:name>local:remove-date</xqdoc:name><xqdoc:annotations><xqdoc:annotation namespace="http://www.zorba-xquery.com/annotations" localname="sequential" value=""/></xqdoc:annotations><xqdoc:signature>declare %ann:sequential function local:remove-date($xqdoc)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>xqdoc</xqdoc:name></xqdoc:parameter></xqdoc:parameters></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
129 | \ No newline at end of file |
130 | |
131 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/no_global_var.xml.res' |
132 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/no_global_var.xml.res 2011-08-04 02:14:56 +0000 |
133 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/no_global_var.xml.res 2012-03-15 22:38:22 +0000 |
134 | @@ -1,2 +1,1 @@ |
135 | -<?xml version="1.0" encoding="UTF-8"?> |
136 | -<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>foo:bar</xqdoc:uri><xqdoc:name>no_global_var.xqlib</xqdoc:name><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="ann" uri="http://www.zorba-xquery.com/annotations"/><xqdoc:namespace prefix="foo" uri="foo:bar"/></xqdoc:custom></xqdoc:module><xqdoc:imports/><xqdoc:variables><xqdoc:variable><xqdoc:uri>foo:foo</xqdoc:uri></xqdoc:variable></xqdoc:variables><xqdoc:functions><xqdoc:function arity="0"><xqdoc:name>foo:bar</xqdoc:name><xqdoc:annotations><xqdoc:annotation namespace="http://www.zorba-xquery.com/annotations" localname="sequential" value=""/></xqdoc:annotations><xqdoc:signature>declare %ann:sequential function foo:bar()</xqdoc:signature><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>concat</xqdoc:name></xqdoc:invoked></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
137 | \ No newline at end of file |
138 | +<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>foo:bar</xqdoc:uri><xqdoc:name>no_global_var.xqlib</xqdoc:name><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="ann" uri="http://www.zorba-xquery.com/annotations" isSchema="false"/><xqdoc:namespace prefix="foo" uri="foo:bar" isSchema="false"/></xqdoc:custom></xqdoc:module><xqdoc:imports/><xqdoc:variables><xqdoc:variable><xqdoc:uri>foo:foo</xqdoc:uri></xqdoc:variable></xqdoc:variables><xqdoc:functions><xqdoc:function arity="0"><xqdoc:name>foo:bar</xqdoc:name><xqdoc:annotations><xqdoc:annotation namespace="http://www.zorba-xquery.com/annotations" localname="sequential" value=""/></xqdoc:annotations><xqdoc:signature>declare %ann:sequential function foo:bar()</xqdoc:signature><xqdoc:invoked arity="2"><xqdoc:uri>http://www.w3.org/2005/xpath-functions</xqdoc:uri><xqdoc:name>concat</xqdoc:name></xqdoc:invoked></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
139 | \ No newline at end of file |
140 | |
141 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/testSchemaTypes.xml.res' |
142 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/testSchemaTypes.xml.res 2012-02-28 20:45:43 +0000 |
143 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/testSchemaTypes.xml.res 2012-03-15 22:38:22 +0000 |
144 | @@ -1,2 +1,1 @@ |
145 | -<?xml version="1.0" encoding="UTF-8"?> |
146 | -<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>http://www.example.com/testModule</xqdoc:uri><xqdoc:name>image.xqlib</xqdoc:name><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="image" uri="http://www.zorba-xquery.com/modules/image/image"/><xqdoc:namespace prefix="testModule" uri="http://www.example.com/testModule"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.zorba-xquery.com/modules/image/image</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables/><xqdoc:functions><xqdoc:function arity="1"><xqdoc:name>testModule:test</xqdoc:name><xqdoc:signature>declare function testModule:test($image as image:imageType)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>image</xqdoc:name><xqdoc:type>image:imageType</xqdoc:type></xqdoc:parameter></xqdoc:parameters></xqdoc:function><xqdoc:function arity="1"><xqdoc:name>testModule:test2</xqdoc:name><xqdoc:signature>declare function testModule:test2($image as xs:string)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>image</xqdoc:name><xqdoc:type>xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:invoked arity="1"><xqdoc:uri>http://www.example.com/testModule</xqdoc:uri><xqdoc:name>test</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.zorba-xquery.com/modules/image/image</xqdoc:uri><xqdoc:name>imageType</xqdoc:name></xqdoc:invoked></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
147 | +<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>http://www.example.com/testModule</xqdoc:uri><xqdoc:name>image.xqlib</xqdoc:name><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="image" uri="http://www.zorba-xquery.com/modules/image/image" isSchema="true"/><xqdoc:namespace prefix="testModule" uri="http://www.example.com/testModule" isSchema="false"/></xqdoc:custom></xqdoc:module><xqdoc:imports><xqdoc:import type="schema"><xqdoc:uri>http://www.zorba-xquery.com/modules/image/image</xqdoc:uri></xqdoc:import></xqdoc:imports><xqdoc:variables/><xqdoc:functions><xqdoc:function arity="1"><xqdoc:name>testModule:test</xqdoc:name><xqdoc:signature>declare function testModule:test($image as image:imageType)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>image</xqdoc:name><xqdoc:type>image:imageType</xqdoc:type></xqdoc:parameter></xqdoc:parameters></xqdoc:function><xqdoc:function arity="1"><xqdoc:name>testModule:test2</xqdoc:name><xqdoc:signature>declare function testModule:test2($image as xs:string)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>image</xqdoc:name><xqdoc:type>xs:string</xqdoc:type></xqdoc:parameter></xqdoc:parameters><xqdoc:invoked arity="1"><xqdoc:uri>http://www.example.com/testModule</xqdoc:uri><xqdoc:name>test</xqdoc:name></xqdoc:invoked><xqdoc:invoked arity="1"><xqdoc:uri>http://www.zorba-xquery.com/modules/image/image</xqdoc:uri><xqdoc:name>imageType</xqdoc:name></xqdoc:invoked></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
148 | \ No newline at end of file |
149 | |
150 | === modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/unorderedAnnotations.xml.res' |
151 | --- test/rbkt/ExpQueryResults/zorba/xqdoc/unorderedAnnotations.xml.res 2012-02-28 20:45:43 +0000 |
152 | +++ test/rbkt/ExpQueryResults/zorba/xqdoc/unorderedAnnotations.xml.res 2012-03-15 22:38:22 +0000 |
153 | @@ -1,6 +1,5 @@ |
154 | -<?xml version="1.0" encoding="UTF-8"?> |
155 | -<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>http://www.28msec.com/modules/mymodule</xqdoc:uri><xqdoc:name>unorderedAnnotations.xqlib</xqdoc:name><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="mymod" uri="http://www.28msec.com/modules/mymodule"/></xqdoc:custom></xqdoc:module><xqdoc:imports/><xqdoc:variables/><xqdoc:functions><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description> This function contains some unordered annotations. |
156 | +<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0"><xqdoc:control><xqdoc:date/><xqdoc:version>1.0</xqdoc:version></xqdoc:control><xqdoc:module type="library"><xqdoc:uri>http://www.28msec.com/modules/mymodule</xqdoc:uri><xqdoc:name>unorderedAnnotations.xqlib</xqdoc:name><xqdoc:custom tag="namespaces"><xqdoc:namespace prefix="mymod" uri="http://www.28msec.com/modules/mymodule" isSchema="false"/></xqdoc:custom></xqdoc:module><xqdoc:imports/><xqdoc:variables/><xqdoc:functions><xqdoc:function arity="2"><xqdoc:comment><xqdoc:description> This function contains some unordered annotations. |
157 | They should be ordered in the resulting XQDoc XML |
158 | according to the XQDoc schema: |
159 | description author version param return error deprecated see since |
160 | -</xqdoc:description><xqdoc:param>$one A dummy param.</xqdoc:param><xqdoc:param>$two One param.</xqdoc:param><xqdoc:return>Place of no return</xqdoc:return><xqdoc:error>Do we throw errors?</xqdoc:error><xqdoc:deprecated/><xqdoc:see>This should be almost at the end</xqdoc:see><xqdoc:since>The beginning of the world.</xqdoc:since></xqdoc:comment><xqdoc:name>mymod:foo</xqdoc:name><xqdoc:signature>declare function mymod:foo($one, $two)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>one</xqdoc:name></xqdoc:parameter><xqdoc:parameter><xqdoc:name>two</xqdoc:name></xqdoc:parameter></xqdoc:parameters></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
161 | +</xqdoc:description><xqdoc:param>$one A dummy param.</xqdoc:param><xqdoc:param>$two One param.</xqdoc:param><xqdoc:return>Place of no return</xqdoc:return><xqdoc:error>Do we throw errors?</xqdoc:error><xqdoc:deprecated/><xqdoc:see>This should be almost at the end</xqdoc:see><xqdoc:since>The beginning of the world.</xqdoc:since></xqdoc:comment><xqdoc:name>mymod:foo</xqdoc:name><xqdoc:signature>declare function mymod:foo($one, $two)</xqdoc:signature><xqdoc:parameters><xqdoc:parameter><xqdoc:name>one</xqdoc:name></xqdoc:parameter><xqdoc:parameter><xqdoc:name>two</xqdoc:name></xqdoc:parameter></xqdoc:parameters></xqdoc:function></xqdoc:functions></xqdoc:xqdoc> |
162 | \ No newline at end of file |
The change looks good. One question: is using the same prefix that the original module used likely to cause any conflicts? Are those prefixes generally unique as well as the module prefixes?