[webbeans-dev] Typing of XML elements

Gavin King gavin.king at gmail.com
Thu Mar 19 11:46:06 EDT 2009


Wasn't dissin' - just trying to be helpful. I dont remember this stuff  
myself.

Sent from my iPhone

On Mar 19, 2009, at 10:34 AM, Nicklas Karlsson <nickarls at gmail.com>  
wrote:

> Not fair, Pete, you get paid to be insulted! ;-)
>
> On 3/19/09, Pete Muir <pmuir at redhat.com> wrote:
>> s/Pete/Nik/ :-)
>>
>> I'm just proxying Nik's questions for some reason here...
>>
>> On 19 Mar 2009, at 15:06, Gavin King wrote:
>>
>>> Pete, my memory is there are 2 or 3 ways to do "inheritance" in XML
>>> schemas. I recommend you buy a book on this and read it :)
>>>
>>> Sent from my iPhone
>>>
>>> On Mar 19, 2009, at 7:40 AM, Pete Muir <pmuir at redhat.com> wrote:
>>>
>>>>
>>>> On 18 Mar 2009, at 04:38, Jason T. Greene wrote:
>>>>
>>>>> Pete Muir wrote:
>>>>>> Hi Norman, and other XML experts,
>>>>>> One of the tasks for Web Beans is to build an XSD. There is an
>>>>>> XSD per package, and an root-element per class. Classes can have
>>>>>> annotations, such as bindings, which makes them into a bean. This
>>>>>> means, for example, that a child element of the class element
>>>>>> could be a binding type annotation (it's XML element equivalent),
>>>>>> however placing, for example, an annotation which is not, for
>>>>>> example, a binding type would be an error.
>>>>>> Therefore, we can increase the "type safety" of the XSD by
>>>>>> restricting the category of child elements that can be placed in
>>>>>> the class element. However, I don't know how to do this in XSD -
>>>>>> any pointers?
>>>>>
>>>>> I'm not sure I understand what you want, however it sounds like a
>>>>> substitution group. Can you give an example?
>>>>
>>>> For example in package com.acme
>>>>
>>>> class Foo {
>>>>
>>>>
>>>> }
>>>>
>>>> could be described by XML:
>>>>
>>>> <acme:Foo>
>>>>
>>>> </acme:Foo>
>>>>
>>>> Now, I want to add the binding com.acme.sales.Bar to the Foo class:
>>>>
>>>> <acme:Foo>
>>>> <sales:Bar />
>>>> </acme:Foo>
>>>>
>>>> In other words, any binding type can be inserted as a child element
>>>> to a class. So, we need a way to identify this as a point that any
>>>> binding type can be inserted.
>>>>
>>>> Does this explain it better?
>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jason T. Greene
>>>>> JBoss, a division of Red Hat
>>>>
>>>> --
>>>> Pete Muir
>>>> http://www.seamframework.org
>>>> http://in.relation.to/Bloggers/Pete
>>>>
>>>> _______________________________________________
>>>> webbeans-dev mailing list
>>>> webbeans-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/webbeans-dev
>>
>> --
>> Pete Muir
>> http://www.seamframework.org
>> http://in.relation.to/Bloggers/Pete
>>
>> _______________________________________________
>> webbeans-dev mailing list
>> webbeans-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/webbeans-dev
>>
>
> -- 
> Sent from my mobile device
>
> ---
> Nik



More information about the weld-dev mailing list