From: Manuel Collado <m.collado@fi.upm.es>
Subject: Re: ANNOUNCE: Avatox 1.0 is now available
Date: Mon, 11 Sep 2006 09:58:38 +0200
Date: 2006-09-11T09:58:38+02:00 [thread overview]
Message-ID: <4505172d@news.upm.es> (raw)
In-Reply-To: <m23bb1s01k.fsf@grendel.local>
Simon Wright escribi�:
> Manuel Collado <m.collado@fi.upm.es> writes:
>
>> What puzzles me is that the XML structure (nesting) doesn't follows
>> the lexical Ada source structure. Example from avatox.adb -->
>> avatox.adb.xml:
>>
>> <A_CLAUSE ... startLine="29" endLine="29" startCol="1" endCol="29">
>> <A_WITH_CLAUSE ... startLine="29" endLine="29" startCol="1" endCol="29"/>
>> <AN_EXPRESSION ... startLine="29" endLine="29" startCol="6" endCol="28">
>> <A_SELECTED_COMPONENT ... startLine="29" endLine="29" startCol="6"
>> endCol="28"/>
>> <AN_EXPRESSION ... startLine="29" endLine="29" startCol="6" endCol="19">
>> ....
>>
>> You can see that <A_WITH_CLAUSE> from (29,1) to (29,29) lexically
>> contains <AN_EXPRESSION> from (29,6) to (29,28). But the latest is not
>> nested inside the former. Instead, it appears as a sibling of it.
>
> Marc and I disagree on this one. My approach in asis2xml is to have
>
> <context_clauses>
> <with_clause>
> <selected_component>
> <selected_component>
> <identifier>Ada</identifier>
> <identifier>Characters</identifier>
> </selected_component>
> <identifier>Handling</identifier>
> </selected_component>
> </with_clause>
>
> but it would be just as sensible to have
>
> <clause kind="with_clause">
>
> The XPATH expressions aren't that different:
>
> A_CLAUSE[A_WITH_CLAUSE]
> with_clause
> clause[@kind='with_clause']
>
> It depends what would be most useful. As an example of where user
> input would be good, what about that <selected_component> structure,
> which does follow the lexical structure of the language, but imagine
> the query to find all withs of Ada.Characters.Handling!
Well, the // (descendant) axis of XPATH looks directly for inner nodes,
skipping intermediate levels.
--
Manuel Collado
next prev parent reply other threads:[~2006-09-11 7:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-17 0:58 ANNOUNCE: Avatox 1.0 is now available Marc A. Criley
2006-08-17 2:10 ` Jeffrey Creem
2006-08-18 8:03 ` Pascal Obry
2006-08-18 8:04 ` Pascal Obry
2006-08-18 8:05 ` Pascal Obry
2006-08-21 20:59 ` Simon Wright
2006-08-24 0:41 ` Marc A. Criley
2006-08-24 6:03 ` Simon Wright
2006-08-25 1:15 ` Marc A. Criley
2006-09-06 23:29 ` Randy Brukardt
2006-09-07 20:46 ` Simon Wright
2006-09-08 2:40 ` Randy Brukardt
2006-09-08 13:40 ` Georg Bauhaus
2006-09-09 8:28 ` Manuel Collado
2006-09-09 12:21 ` Simon Wright
2006-09-11 7:58 ` Manuel Collado [this message]
2006-09-09 18:56 ` Marc A. Criley
2006-09-11 8:10 ` Manuel Collado
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox