Bruno Mannina a écrit :
>> Sinon, il est possible d'utiliser un parser HTML disposant de sélecteurs
>> CSS 3 et de lire les noeuds texte correspondant à un pattern d'imbrication
>> de noeuds :
>>
>> Avec prototype.js (javascript) ca donnerait :
>>
>> mesNoeuds = $$('br + br ')
>>
>> (+ est le sélecteur de noeuds qui sont au même niveau d'imbrication)
>>
>> Chouette non ?
>
> Je doute qu'avec ce type d'utilisation on puisse tenir compte de la partie
> variable qui dans le texte et non dans un attribut.
Ce genre de préjugé moi ça me motive ;-)
Voilà la version ruby + HPricot un parser [X]HTML qui dispose d'un
excellent support des sélecteurs CSS 3 et d'un opérateur "/" vachement
mignon :
Ceci est le script intégral qui réalise exactement ce que tu veux :
#!/bin/env ruby
require 'hpricot'
doc = Hpricot.parse(File.read("EP0714663.html"))
(doc/"br + br + *").each do |n|
puts n.to_s.strip
end
Output (sur STDOUT) :
1. Use for the manufacture of a medicament for potentiating the action
of a first component chosen from the group consisting of citalopram,
fluvoxamine and paroxetine in increasing the availability of serotonin,
norepinephrine and dopamine in the brain, of a combination of a first
component and a second component chosen from the group consisting of
alprenolol, WAY 100135, WAY 100635, spiperone, pindolol, (S)-UH-301,
penbutolol, propranolol, tertatolol, and a compound of the formula
2. A use of claim 1 wherein the first component is citalopram.
3. A use of claim 1 wherein the first component is fluvoxamine.
4. A use of claim 1 wherein the first component is paroxetine.
5. A use of any one of claims 1-4 wherein the second component is chosen
from the group consisting of pindolol, penbutolol, propranolol,
tertatolol, and 4-(2-hydroxy-3-cyclohexylaminopropoxy)indole.
6. Use for the manufacture of a medicament for treating a pathological
condition which is created by or is dependent upon decreased
availability of serotonin, norepinephrine or dopamine, of a first
component chosen from the group consisting of citalopram, fluvoxamine
and paroxetine, in combination with a second component chosen from the
group consisting of alprenolol, WAY 100135, WAY 100635, spiperone,
pindolol, (S)-UH-301, penbutolol, propranolol, tertatolol, and a
compound of the formula
7. A use of claim 6 wherein the pathological condition is depression.
8. A use of claim 6 wherein the pathological condition is obsessive
compulsive disease.
9. A use of any one of claims 6-8 wherein the second component is chosen
from the group consisting of pindolol, penbutolol, propranolol,
tertatolol, and 4-(2-hydroxy-3-cyclohexylaminopropoxy)indole.
10.A pharmaceutical composition which comprises a first component chosen
from the group consisting of citalopram, fluvoxamine and paroxetine in
combination with a second component chosen from the group consisting of
alprenolol, WAY 100135, WAY 100635, spiperone, pindolol, (S)-UH-301,
penbutolol, propranolol, tertatolol, and a compound of the formula
11. A composition of claim 10 wherein the second component is chosen
from the group consisting of pindolol, penbutolol, propranolol,
tertatolol and 4-(2-hydroxy-3-cyclohexylaminopropoxy)indole.
Bon courage tout de même, @+
--
Pierre Y.
KeyID : 0x7890CFE9
Viadéo :
http://www.viadeo.com/invitationpers...221mij222775qk