[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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




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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170321/9a0ad9ae/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170321/9a0ad9ae/attachment-0001.gif