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

Lourdes Calvo Montero lcalvom at pas.ucm.es
Thu Nov 28 14:09:36 GMT 2013


---------- Forwarded message ----------
From: <eprints-tech-bounces at ecs.soton.ac.uk>
Date: 2013/11/28
Subject: The results of your email commands
To: lcalvom at 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 at pas.ucm.es>
To: eprints-tech-request at 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 ) );
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20131128/c464de6a/attachment.html 


More information about the Eprints-tech mailing list