rackspace/wadl-tools — Issue #9: Error when a wadl refers to a schema over a url instead of a relative path
Author: dwcramer
Created: 2012-01-24 20:22:42+00:00
State: open

[2:00:34 PM CDT] Jorge Luis Williams: Recoverable error on line 82 of normalizeWadl1.xsl:
[java] FODC0002: java.io.FileNotFoundException:
[java] /Users/jorgew/projects/os-docs/identity-api/openstack-identity-api/src/docbkx/RAX-KSGRP/xsd/https:/raw.github.com/openstack/keystone/master/keystone/content/common/xsd/api.xsd (No such file
[2:01:00 PM CDT] David Cramer: Hmm. Wonder if that's regression from the change.
[2:01:11 PM CDT] David Cramer: Or was that happening before the change this morning?
[2:01:29 PM CDT] Jorge Luis Williams: Well, it's a new extension, so no way to tell...let me try again now
[2:01:49 PM CDT] David Cramer: Building off 1.0.9 might tell you.
[2:02:01 PM CDT] David Cramer: And do you have that switch thrown...one sec.
[2:02:13 PM CDT] Jorge Luis Williams: I got it both in 1.0.9 an 1.0.10-snapshot
[2:02:28 PM CDT] Jorge Luis Williams: switch?
[2:04:03 PM CDT] David Cramer: Hmm...though there was a param...looking fo rit.
[2:05:01 PM CDT] Jorge Luis Williams: Still happening
[2:05:27 PM CDT] David Cramer: Ok. I know where to look for that one...one sec.
[2:07:05 PM CDT] David Cramer: Ok, I see the problem:
[2:07:11 PM CDT] David Cramer:
[2:07:24 PM CDT] David Cramer: That works for local xsds but not for urls.
[2:09:05 PM CDT] Jorge Luis Williams: You should be able to pass an URL to document...that should work.
[2:09:27 PM CDT] David Cramer: It's the second argument that trips it up.
[2:09:43 PM CDT] David Cramer: document(@location, . ) v. document(@location)
[2:09:57 PM CDT] Jorge Luis Williams: Right.
[2:10:25 PM CDT] Jorge Luis Williams: There's a XPath2 call me thinks that turns relative paths into abolute ones---something like that
[2:10:49 PM CDT] David Cramer: base-uri()?
[2:11:08 PM CDT] David Cramer: Ah, so just do document(base-uri(@location))
[2:11:09 PM CDT] David Cramer: ?
[2:11:43 PM CDT] Jorge Luis Williams: I think so..I don't remember exactly
[2:12:10 PM CDT] David Cramer: resolve-uri()
[2:12:11 PM CDT] David Cramer: ?
[2:12:48 PM CDT] Jorge Luis Williams: That might be it
[2:12:58 PM CDT] Jorge Luis Williams: I don't have my text book with me
[2:15:30 PM CDT] David Cramer: http://books.google.com/books?id=OnqLX4RgOkIC&pg=PA868&lpg=PA868&dq=resolve-uri+xslt+2.0&source=bl&ots=nV4n19vu95&sig=KjWcoAy8ijQXTAySFLup0e_JUk0&hl=en&sa=X&ei=HhEfT8upDsfdgQf_5uyIDw&ved=0CGUQ6AEwBg#v=onepage&q=resolve-uri%20xslt%202.0&f=false
[2:17:17 PM CDT] David Cramer:

[2:18:10 PM CDT] David Cramer: iff --git a/xsl/normalizeWadl1.xsl b/xsl/normalizeWadl1.xsl
index ed9f6af..cd5cf65 100644
--- a/xsl/normalizeWadl1.xsl
+++ b/xsl/normalizeWadl1.xsl
@@ -80,8 +80,8 @@
location="{@location}"
name="{@name}">

-
-
+
+

[2:18:54 PM CDT] Jorge Luis Williams: Seems like there should be a test to cover this :-)
[2:19:24 PM CDT] David Cramer: Yeah.