EPrints Technical Mailing List Archive

Message: #06358


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

Re: [EP-tech] Antwort: a question about: render_data_element


Thanks a lot.
Alfredo

2017-03-21 10:20 GMT+01:00 <martin.braendle@id.uzh.ch>:

It is the indent width in characters.

See perl_lib/EPrints/Repository.pm
=pod

=begin InternalDoc

=item $xhtml = $repository->render_data_element( $indent, $elementname, $value, [%opts] )

This is used to help render neat XML data. It returns a fragment
containing an element of name $elementname containing the value
$value, the element is indented by $indent spaces.

The %opts describe any extra attributes for the element

eg.
$repository->render_data_element( 4, "foo", "bar", class=>"fred" )

would return a XML DOM object describing:
    <foo class="fred">bar</foo>

=end InternalDoc

=cut
######################################################################

sub render_data_element
{
        my( $self, $indent, $elementname, $value, %opts ) = @_;

        return $self->xhtml->data_element( $elementname, $value,
                indent => $indent,
                %opts );
}


Cheers,

Martin

--
Dr. Martin Brändle
Zentrale Informatik
Universität Zürich


Inactive hide details for Alfredo Cosco ---21/03/2017 10:10:34---Hi All, i find a function like this:Alfredo Cosco ---21/03/2017 10:10:34---Hi All, i find a function like this:

Von: Alfredo Cosco <alfredo.cosco@gmail.com>
An: eprints-tech@ecs.soton.ac.uk
Datum: 21/03/2017 10:10
Betreff: [EP-tech] a question about: render_data_element
Gesendet von: eprints-tech-bounces@ecs.soton.ac.uk





Hi All,
i find a function like this:

render_data_element( int, value, value );

eg. $dc->appendChild(  $plugin->{session}->render_data_element( 8, "dc:".$_->[0], $_->[1] ) );

What does it mean the first argument, the int number?
I can't find documentation about it 

Thanks
Alfredo*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive:
http://www.eprints.org/tech.php/
*** EPrints community wiki:
http://wiki.eprints.org/
*** EPrints developers Forum:
http://forum.eprints.org/



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/