13.07.2015 Views

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ISBN: 978-972-8939-25-0 © 2010 IADIS arc-destination axis – directs the query to all the elements that are source nodes of arcs whose contextelement is the target.The first axis, linked, is the most generic. Graphically, the result of its application is equivalent topropagate the query through all the lines and arrows connected to the context element. The other axes, arcsourceand arc-destination propagate the query through arrows whose context element is source or target,respectively. Table 2 exemplifies the axes application, in different levels of abstraction, to the elements ofFigure 1. To differentiate elements with repeated names, the same numeration used as labels in Figures 3 and4 were superscribed on them.Table 2. Examples of abstraction levels and axis.Table 3. Examples of element specification.Context element Level and Axis Identified Elements Context element Element Specification Selected Elementsd‐ba_TotalBankingActivitiesd‐ba_TotalBankingActivitiesLL::linkedHL::linkedlink:loc 3 ,link:definitionArc 4 ,link:definitionArc 6link:definitionArc 4 link:loc 3 ,,link:definitionArc 6 link:definitionArc 4 ,link:definitionArc 6d‐ba_TotalBankingActivities, locator() link:loc 3link:loc 3arc()link:definitionArc 4 ,link:definitionArc 6link:loc 3 LL::arc‐source link:definitionArc 6 link:definitionArc4 ,link:definitionArc 6 arc(link:definitionArc) link:definitionArc 4 ,link:definitionArc 6d‐ba_BankingActivitiesDomainlink:definitionArc 6HL::arc‐source link:definitionArc 4 BankingActivities,d‐ba_Bankingd‐ba_TotalActivitiesDomainLL::arcdestinationlink:loc 5 link:loc 3 ,link:definitionArc 4 ,d‐ba_BankingActivitiesDomainremote(d‐ba_TotalBankingActivities)element()d‐ba_TotalBankingActivitieslink:loc 3 ,link:definitionArc 4 ,d‐ba_BankingActivitiesDomainElement Specification: The element specification determines which elements in the axis direction will beselected. The selection criteria may be the type and the name of each element, determined, respectively, bythe parameter of the function elementType(elementName). XLPath provides the following elementspecification: locator(elementName) – selects elements of locator type with the name elementName; arc(elementName) – selects elements of arc type with the name elementName; resource(elementName) – selects elements of resource type with the name elementName; remote(elementName) – selects remote resources with the name elementName; element(elementName) – selects elements of any type with the name elementName.When the parameter elementName is not provided, the filtering is made based only on the type ofelement. Thus, the function element() may be used to put all the elements back in the direction of an axis,regardless the name and the type. Table 3 shows examples of element specification applied to elementsshowed on Figure 1.Predicate: In the examples of Table 3, in some situations, even specifying the element name and type, theresult is an element list. To filter this result, one may use predicates, which consist in conditions tested oneach element on the list. Just like in XPath, the usage of predicates is not mandatory. Table 4 exemplifies thepredicates to filter the list of elements extracted from Figure 1. XLPath provides the following conditions: attribute(attributeName)=’attributeValue’ – tests if the element has an attribute attributeName withthe value attributeValue; text()=’textValue’ – tests if the text content of the element equals textValue; link(linkName) – tests if the element belongs to the link linkName.Table 4. Examples of predicatesContext element Predicate Filtered Elementslink:definitionArc 4 ,link:definitionArc 6 attribute(title)=’definition:BankingActivitiesDomain to TotalBankingActivities’ link:definitionArc 4link:loc 3 link(link:definitionLink) link:loc 3The XLPath grammar is illustrated in Figure 5, described through representation based on an EBNF [37].94

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!