
Hi Warren, In the glue2_2.xsd at http://redmine.ogf.org/dmsf/glue-wg?folder_id=32, there is no '<ComputingActivites>,' only '<Activities>' which serves to group the elements that are substitutable for the 'AbstractActivity' substitutionGroup (so currently this includes both 'Activity' and 'ComputingActivity' - and of course any activities that may be profiled in the future that may also define the same substitutionGroup). The relevant XSD fragment is as follows (line 139) - note that it simply serves as a wrapper around AbstractActivity: <element name="Activities" minOccurs="0" maxOccurs="1"> <complexType> <sequence> <element ref="glue:AbstractActivity" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element> Therefore, given the following instance doc: <Entities... > ... <glue:Activities> <glue:Activity BaseType="Activity"> <glue:ID>http://activity1.ac.uk/1</glue:ID> <glue:Associations/> </glue:Activity> <glue:ComputingActivity BaseType="Activity"> <glue:ID>computingActivity1</glue:ID> <glue:State>some state</glue:State> <glue:Owner>someone</glue:Owner> <glue:Associations/> </glue:ComputingActivity> ...here nest more elements that can substitute for the AbstractActivity substitutionGroup... </glue:Activities> ... </Entities> To select all of the different flavours of Activity in a single query, you could use the following XPath: '/Entities/Activities/*'. Similarly, for all services; '/Entities/Services/*' and for all Endpoints; '/Entities/Endpoints/*' etc. I guess it depends if you think this is useful. Without the 'Activities' element, to select all the different types of activity, you would currently need to issue two XPath queries and concat the two docs: '/Entities/Activity' and '/Entities/ComputingActivity'. Personally, I think it is useful to be able to select/collapse all of the Services, Endpoints, Activities etc with one button click or query, especially when considering large documents that may have 1000s of endpoints listed. Either way, it's only a small change from the version that does not define these grouping elements (http://redmine.ogf.org/dmsf/glue-wg?folder_id=31) David
-----Original Message----- From: Warren Smith [mailto:wsmith@tacc.utexas.edu] Sent: 31 August 2012 14:48 To: Burke, Stephen (STFC,RAL,PPD); Meredith, David (STFC,DL,SC); Meredith, David (STFC,DL,SC); florido.paganelli@hep.lu.se; glue-wg@ogf.org Subject: RE: [glue-wg] flat xml rendering
My general opinion is not to have any -ies elements (e.g. ComputingActivities) to group elements. To me, this grouping of elements (e.g. ComputingActivity) isn't needed in XML. It doesn't seem to make it any easier to process the XML using SAX or DOM. It seems easy to find all -y elements in a document without a -ies element as a parent for visualizing. Similarly, it also seems easy to find -y elements in an XML document if you want to translate it to LDAP or SQL or whatever.
I haven't really done much xPath... Can someone explain how grouping elements would help? It seems like either way you'd include 'ComputingActivity' in the expression. That is the expression would start with "/Entities/ComputingActivities/ComputingActivity..." or "/Entities/ComputingActivity...".
Warren
-----Original Message----- From: glue-wg-bounces@ogf.org [mailto:glue-wg-bounces@ogf.org] On Behalf Of stephen.burke@stfc.ac.uk Sent: Friday, August 31, 2012 5:20 AM To: david.meredith@stfc.ac.uk; david.meredith@stfc.ac.uk; florido.paganelli@hep.lu.se; glue-wg@ogf.org Subject: Re: [glue-wg] flat xml rendering
glue-wg-bounces@ogf.org [mailto:glue-wg-bounces@ogf.org] On
Behalf Of david.meredith@stfc.ac.uk said: I think these group elements could be useful for simplifying XPath queries and for visualizing large documents with tools that can collapse/expand elements (see attached image, also uploaded at the following link).
Bear in mind that in the production Grid there are about 4000 endpoints, so grouping may not help a lot with visualisation unless you do it more finely.
Stephen
_______________________________________________ glue-wg mailing list glue-wg@ogf.org https://www.ogf.org/mailman/listinfo/glue-wg -- Scanned by iCritical.