EPrints Technical Mailing List Archive

Message: #02465


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Fwd: The results of your email commands




---------- Forwarded message ----------
From: <eprints-tech-bounces@ecs.soton.ac.uk>
Date: 2013/11/28
Subject: The results of your email commands
To: lcalvom@pas.ucm.es


The results of your email command are provided below. Attached is your
original message.

- Results:
    Ignoring non-text/plain MIME parts

- Unprocessed:
    wrong about the way it forms the list of choices. This is the code, could
    you kindly help me?
    Thanks,
    Lourdes
    while( my( $value ) = $sth->fetchrow_array )
    {
     chomp $value;
    my $doc;
    eval { $doc = EPrints::XML::parse_xml_string( "<div>$value</div>" ) };
    if( $@ )
    {
    $value = $session->make_text( $value );
    }
    else
    {
    $value = $session->make_doc_fragment;
    for($doc->documentElement->childNodes)
    {
    $value->appendChild( $session->clone_for_me( $_, 1 ) );
    }

- Ignored:
    EPrints::XML::dispose( $doc );
    }
    my $li = $session->make_element( "li" );
    $ul->appendChild( $li );
    if( $first )
    {
    $li->setAttribute( "class", "ep_first" );
    $first = 0;
    }
    $li->appendChild( $value );
    my $ul2 = $session->make_element( "ul" );
    my $li2 = $session->make_element( "li", id =>'for:value:relative:');
    $li->appendChild( $ul2 );
    $ul2->appendChild( $li2 );
    $li2->appendChild( $session->clone_for_me( $value, 1 ) );
    }

- Done.



---------- Mensaje reenviado ----------
From: Lourdes Calvo Montero <lcalvom@pas.ucm.es>
To: eprints-tech-request@ecs.soton.ac.uk
Cc: 
Date: Thu, 28 Nov 2013 15:04:55 +0100
Subject: simple-sql cgi lookup
Hi, this cgi does not autocomplete the fields, I think it is something wrong about the way it forms the list of choices. This is the code, could you kindly help me?

Thanks,

Lourdes


while( my( $value ) = $sth->fetchrow_array )
{
chomp $value;
my $doc;
eval { $doc = EPrints::XML::parse_xml_string( "<div>$value</div>" ) };
if( $@ )
{
$value = $session->make_text( $value );
}
else
{
$value = $session->make_doc_fragment;
for($doc->documentElement->childNodes)
{
$value->appendChild( $session->clone_for_me( $_, 1 ) );
}
EPrints::XML::dispose( $doc );
}
my $li = $session->make_element( "li" );
$ul->appendChild( $li );
if( $first )
{
$li->setAttribute( "class", "ep_first" );
$first = 0;
}
$li->appendChild( $value );
my $ul2 = $session->make_element( "ul" );
my $li2 = $session->make_element( "li", id =>'for:value:relative:');
$li->appendChild( $ul2 );
$ul2->appendChild( $li2 );
$li2->appendChild( $session->clone_for_me( $value, 1 ) );
}