[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[pde-dev] Nesting of same element in extension point schema
|
Thank you very very much Benjamin. This worked and this is exactly what I wanted in my schema defintion. I appreciate your time to asnwer my question.
Priyanka
-----Original Message-----
From: pde-dev-bounces@xxxxxxxxxxx [mailto:pde-dev-bounces@xxxxxxxxxxx] On Behalf Of pde-dev-request@xxxxxxxxxxx
Sent: Friday, March 13, 2009 2:35 PM
To: pde-dev@xxxxxxxxxxx
Subject: pde-dev Digest, Vol 48, Issue 7
Send pde-dev mailing list submissions to
pde-dev@xxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
https://dev.eclipse.org/mailman/listinfo/pde-dev
or, via email, send a message with subject or body 'help' to
pde-dev-request@xxxxxxxxxxx
You can reach the person managing the list at
pde-dev-owner@xxxxxxxxxxx
When replying, please edit your Subject line so it is more specific than "Re: Contents of pde-dev digest..."
Today's Topics:
1. Nesting of same element in extension point schema
(Mitra, Priyanka)
2. Re: Nesting of same element in extension point schema
(Benjamin CAB?)
----------------------------------------------------------------------
Message: 1
Date: Fri, 13 Mar 2009 17:21:03 -0400
From: "Mitra, Priyanka" <priyanka.mitra@xxxxxxxxxx>
Subject: [pde-dev] Nesting of same element in extension point schema
To: <pde-dev@xxxxxxxxxxx>
Message-ID:
<6B657591B767A94AA6170DEF5D8B5BB701775FBE@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Hi,
I want to nest the same element in the extension point schema. Is this possible? I tried a few things but didn't work. So I defined a new element "component" using the extension point editor on PDE. Under "extension" node, I defined a sequence of "component" element (1-*).
Within this sequence I created another new sequence of "component"
element (1-*) and then defined another new sequence within the last
sequence comprising of "component" element (1-*). But I didn't get the
desired result. The extenion point had 3 components at the root level rather than nested. I also played around with "choice" but with no luck.
To give you an example..
<component>
<attr1><attr1>
<attr2><attr2>
<attr3><attr3>
<component> <!-- optional -->
<attr1><attr1>
<attr2><attr2>
<attr3><attr3>
<component> <!-- optional -->
<attr1><attr1>
<attr2><attr2>
<attr3><attr3>
<component>
<component>
<component>
Has anyone tried this kind of nesting? I appreciate all your help.
Thanx & Regards
Priyanka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://dev.eclipse.org/mailman/private/pde-dev/attachments/20090313/283fbfc7/attachment.html
------------------------------
Message: 2
Date: Fri, 13 Mar 2009 22:34:48 +0100
From: Benjamin CAB? <benjamin.cabe@xxxxxxxxxxxxxxxx>
Subject: Re: [pde-dev] Nesting of same element in extension point
schema
To: "Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>
Message-ID: <49BAD178.9060809@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Mitra,
You probably want a schema like the following :
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="sandbox" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="sandbox" id="nested" name="nested"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="component"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="component">
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
<element ref="component"/>
</sequence>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
To summarize, <extension> has a sequence of 0-n <component>,a
<component> also having a sequence of 0-n <component>...
Cheers,
Benjamin
Anyware Technologies <http://www.anyware-tech.com>
*Benjamin Cabé*
Expert Eclipse
benjamin.cabe@xxxxxxxxxxxxxxxx <mailto:benjamin.cabe@xxxxxxxxxxxxxxxx>
*http://blog.benjamin-cabe.com*
Tel : +33(0)5 61 00 06 41
Fax : +33(0)5 61 00 51 46
*Nouvelle adresse
*
------------------------------------------------------------------------
*Anyware Technologies
* Lake Park
ZAC de l'Hers - Allée du Lac
BP 87216
31672 Labège Cedex
France
www.anyware-tech.com <http://www.anyware-tech.com>
Mitra, Priyanka a écrit :
>
> Hi,
>
> I want to nest the same element in the extension point schema. Is this
> possible? I tried a few things but didn't work. So I defined a new
> element "component" using the extension point editor on PDE. Under
> "extension" node, I defined a sequence of "component" element (1-*).
> Within this sequence I created another new sequence of "component"
> element (1-*) and then defined another new sequence within the last
> sequence comprising of "component" element (1-*). But I didn't get
> the desired result. The extenion point had 3 components at the root
> level rather than nested. I also played around with "choice" but with
> no luck.
>
> To give you an example..
>
> *<component>*
> <attr1><attr1>
> <attr2><attr2>
> <attr3><attr3>
> * <component> <!-- optional -->*
> <attr1><attr1>
> <attr2><attr2>
> <attr3><attr3>
> * <component> <!-- optional -->*
> <attr1><attr1>
> <attr2><attr2>
> <attr3><attr3>
> * <component>*
> * <component>*
> *<component>*
>
> Has anyone tried this kind of nesting? I appreciate all your help.
>
> Thanx & Regards
> Priyanka
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pde-dev
>
-------------- next part --------------
Skipped content of type multipart/related
------------------------------
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev
End of pde-dev Digest, Vol 48, Issue 7
**************************************