You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Björn Bength (Created JIRA)" <ji...@apache.org> on 2011/11/10 22:37:51 UTC
[jira] [Created] (CAMEL-4666) support catalog entity resolver in
validator-component
support catalog entity resolver in validator-component
------------------------------------------------------
Key: CAMEL-4666
URL: https://issues.apache.org/jira/browse/CAMEL-4666
Project: Camel
Issue Type: Improvement
Components: camel-core
Reporter: Björn Bength
When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Commented] (CAMEL-4666) support catalog entity resolver
in validator-component
Posted by Björn Bength <bj...@gmail.com>.
Should we make an improvement to specify a catalog file on the
validator uri? (simple but "limited" to just this catalog resolver)
Or should the validator processor and component offer a setter to
inject whatever entity resolver and make this catalog resolver a
separately configured bean. (more complex to configure but flexible).
And where to put that bean as some kind of custom entity resolver bean
glue code is necessary I think beacuse xml-resolver can't do it by
itself.
What do you think?
On Thu, Nov 10, 2011 at 10:47 PM, Björn Bength (Commented) (JIRA)
<ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148035#comment-13148035 ]
>
> Björn Bength commented on CAMEL-4666:
> -------------------------------------
>
> Since I didn't find a way to configure a catalog resolver I implemented it myself to see if would work.
> I have a patch that implements this, but as this component lives in camel-core and camel-core seems like it's got a really bare minimum of dependencies and this patch brings in apache xml-resolver, I didn't want to submit it as is.
>
>> support catalog entity resolver in validator-component
>> ------------------------------------------------------
>>
>> Key: CAMEL-4666
>> URL: https://issues.apache.org/jira/browse/CAMEL-4666
>> Project: Camel
>> Issue Type: Improvement
>> Components: camel-core
>> Reporter: Björn Bength
>>
>> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
>> Apache's xml-resolver implements support for oasis and xcatalog formats.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
[jira] [Updated] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Christian Müller (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Müller updated CAMEL-4666:
------------------------------------
Fix Version/s: 2.9.0
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Fix For: 2.9.0
>
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Christian Müller (Closed JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Müller closed CAMEL-4666.
-----------------------------------
Resolution: Fixed
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Fix For: 2.9.0
>
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Christian Müller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148191#comment-13148191 ]
Christian Müller commented on CAMEL-4666:
-----------------------------------------
Björn, I have a look on it right now.
I prefer something like:
{code:java}
to("validator:schema.xsd?resourceResolver=#resourceResolver")
{code}
With this, camel-core doesn't have an additional dependency to "xml-resolver:xml-resolver". If the user decide to use the "xml-resolver:xml-resolver", than it's fine and it will work.
Give me a bit time with your patch...
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Björn Bength (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148843#comment-13148843 ]
Björn Bength commented on CAMEL-4666:
-------------------------------------
very well,
it works, but I really think camel somewhere should depend on xml-resolver (without dragging in CXF...).
And that CatalogLSResourceResolver and all the "initialization" code you put in the test case should be easily available, somehow, to every camel user that isn't a java jedi knight.
Or maybe the validator shouldn't even be in core?
Maybe I should put (all other code) on GitHub somewhere, so everyone doesn't have to dig through camel unit test source code to find out how to use it? :)
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Fix For: 2.9.0
>
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CAMEL-4666) support catalog entity
resolver in validator-component
Posted by "Björn Bength (Issue Comment Edited JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148085#comment-13148085 ]
Björn Bength edited comment on CAMEL-4666 at 11/10/11 11:01 PM:
----------------------------------------------------------------
applies to camel-core.
decided to upload my little patch to have something to think about.
the usage of this implementation is:
from("..")
to("validator:schema.xsd?catalog=catalog.cat")
....
was (Author: bjoben):
applies to camel-core.
decided to upload my little patch to have something to think about.
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Björn Bength (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Björn Bength updated CAMEL-4666:
--------------------------------
Attachment: validator-catalog.patch
applies to camel-core.
decided to upload my little patch to have something to think about.
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Björn Bength (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148035#comment-13148035 ]
Björn Bength commented on CAMEL-4666:
-------------------------------------
Since I didn't find a way to configure a catalog resolver I implemented it myself to see if would work.
I have a patch that implements this, but as this component lives in camel-core and camel-core seems like it's got a really bare minimum of dependencies and this patch brings in apache xml-resolver, I didn't want to submit it as is.
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Björn Bength (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148312#comment-13148312 ]
Björn Bength commented on CAMEL-4666:
-------------------------------------
Yes, i sent a separate email to the dev-list with this question:
Should we make an improvement to specify a catalog file on the
validator uri? (simple but "limited" to just this catalog resolver)
Or should the validator processor and component offer a setter to
inject whatever entity resolver and make this catalog resolver a
separately configured bean. (more complex to configure but flexible).
And where to put that bean as some kind of custom entity resolver bean
glue code is necessary I think beacuse xml-resolver can't do it by
itself.
What do you think?
The problem with the more flexible solution is it requires extensive work by the end-user as he need to write this wrapper-code and then configure it a lot more.
Compare with for example "xjc" tool or the "maven-jaxb2-plugin" where you can specify a catalog file. Plain and simple.
If this glue code can be provided in another camel module, it would be a little less problem. Just a lot more configuration for the end-user.
I'm of course open to any solution to this problem because now the validation component is mostly useless to all my use cases.
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Christian Müller (Assigned JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Müller reassigned CAMEL-4666:
---------------------------------------
Assignee: Christian Müller
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Christian Müller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148795#comment-13148795 ]
Christian Müller commented on CAMEL-4666:
-----------------------------------------
Björn, thank you very much for your patch.
I changed it a bit regarding to be able to look up a reference to a org.w3c.dom.ls.LSResourceResolver instance in the registry and some check style issues (see [] for details).
I share your doubts that this is not the best solution, because each user has to provide its own org.w3c.dom.ls.LSResourceResolver implementation to use this functionality. On the other site, we try to avoid to have additional dependencies in camel-core to be so light weight as possible. May we should consider to externalize this functionality into it's own component and provide a good org.w3c.dom.ls.LSResourceResolver implementation...
[1] http://camel.apache.org/building.html
P.S.: I didn't back port this fix into the camel-2.8.x and camel-2.7.x branch because in these versions the validator component was part of camel-spring and makes a bit harder to back port this change. But feel free to raise your voice if it's needed...
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Fix For: 2.9.0
>
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4666) support catalog entity resolver in
validator-component
Posted by "Christian Müller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148993#comment-13148993 ]
Christian Müller commented on CAMEL-4666:
-----------------------------------------
http://camel.465427.n5.nabble.com/DISCUSS-Extract-camel-validator-from-camel-core-td4986357.html
> support catalog entity resolver in validator-component
> ------------------------------------------------------
>
> Key: CAMEL-4666
> URL: https://issues.apache.org/jira/browse/CAMEL-4666
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Björn Bength
> Assignee: Christian Müller
> Fix For: 2.9.0
>
> Attachments: validator-catalog.patch
>
>
> When validating XML files against schema files, it's fairly common they import other schemas and it's faily common they cannot be found, or reached, at the specified schema location. Their location must therefore be rewritten, or resolved, to find the the correct schema-file elsewhere.
> Apache's xml-resolver implements support for oasis and xcatalog formats.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira