kszbcss / xspec

Private backup of the xspec project at google code, as google code is going to disappear.
MIT License
1 stars 0 forks source link

Query generated by generate-query-tests.xsl not importing original query correctly #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The query produced by generate-query-tests.xsl is not importing the original 
module correctly for me.  

I can only make the xslt execute to completion if I place the namespace in the 
@query attribute, in which case I get this:

   import module namespace t = "http://test.com"

What I want is this:

   import module namespace t = "http://test.com" at "original-query.xql"

I assumed that @query is supposed to be the file location of the original 
xquery, and changed <xsl:template match="x:description" mode="x:gen" /> to 
parse 
the xquery as plain text, extract the module namespace, and assign it to the 
correct prefix from the xspec document.  I've attached a patch.

I haven't tried it, but I expect the patch doesn't work if you're using another 
method (like Florent's packaging system) to resolve the import URIs directly.  
So this may not be the best approach.  

If that's the case, maybe we need two attributes on x:description?  @query (for 
the namespace) and an optional @filename (for the location of the original 
query 
on disk)?

Original issue reported on code.google.com by jsulak@gmail.com on 25 Jan 2010 at 2:54

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by fgeorges on 25 Jan 2010 at 7:26

GoogleCodeExporter commented 9 years ago
Fixed in r59. Attributes used to identify the target query module are now 
@query for 
the target namespace and @query-at for the "at hint" (optional).

Original comment by fgeorges on 26 Jan 2010 at 3:13