How to tokenize the “xml:base” in jaxb?

Conroy94

New Member
We have a big xml schma broken down into many files. They are connected by \[code\]<xi:inclue>\[/code\],\[code\]<Configuration xml:base="file:///c:/abs/def/Configuration/" xmlns:xi="http://www.w3.org/2001/XInclude" ......><xi:include href="http://stackoverflow.com/questions/15534048/HistoricalInformation.xml" />... </Configuration>\[/code\]The files are loaded in by java jaxb protocal. We would like to use this in two different environments with different paths for the schema. So we would like to be able to tokenize the content of the xml:base attribute to something like this \[code\]<Configuration xml:base="file:///${location}/Configuration/"xmlns:xi="http://www.w3.org/2001/XInclude" ... >\[/code\]Then we can replace ${location} with different values in different environments. The way I can come up is to read the file as text, replace the token and then pass it into jaxb engine for unmarshalling. But that is kind of ugly. Is it possible to do it within the jaxb or xml? Thanks.
 
Back
Top