[jboss-dev] Re: XML Schema for JGroups - annotations galore

Jason T. Greene jason.greene at redhat.com
Thu Jan 22 15:15:40 EST 2009


Sorry I missed your email Vladimir. Set the elementFormDefault of your 
schema to "qualified", otherwise everything you declare will end up in 
the "" namespace.

Brian Stansberry wrote:
> Ask on jboss-development at lists.jboss.org. It's a totally appropriate 
> question for the list and you're more likely to get an answer since a 
> number of more technical people kinda ignore thecore.
> 
> Vladimir Blagojevic wrote:
>> Brian,
>>
>> Do you think it is inappropriate to ask for help on the core regarding 
>> this issue? I am ripping my hair out by now trying to figure this one 
>> out!
>>
>> Thanks,
>> Vladimir
>>
>> On 1/21/09 4:52 PM, Vladimir Blagojevic wrote:
>>> On 1/20/09 1:55 PM, Jason T. Greene wrote:
>>>> You should specify a namespace using targetNamespace, so that 
>>>> components like JBC can inline the jgroups config into the JBC 
>>>> config. Current practice is to use a URN style URL for the namespace 
>>>> instead of http. I would also recommend bundling the schema in the 
>>>> jgroups jar in META-INF/schemas so that you can optionally enable 
>>>> schema validation without requiring the schema file in the install.
>>> Do you mean having a schema declaration start like this:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
>>> targetNamespace="urn:org:jgroups">
>>>
>>> If I have a jgroups conf file:
>>>
>>> <config xmlns="urn:org:jgroups"
>>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>         
>>> xsi:schemaLocation="file:/Users/vladimir/workspace/JGroups-HEAD/JGroups-2.7.xsd"> 
>>>
>>> <UDP
>>>          mcast_addr="${jgroups.udp.mcast_addr:232.10.10.10}"
>>>          mcast_port="${jgroups.udp.mcast_port:45588}"
>>>          ....
>>>
>>>
>>> then for some reason my editor (Oxygen) always reports that conf file 
>>> is well formed - even if it clearly is not.
>>>
>>> What am I doing wrong?
>>>
>>> Regards,
>>> Vladimir
>>>
>>
> 
> 


-- 
Jason T. Greene
JBoss, a division of Red Hat



More information about the jboss-development mailing list