GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XML::COMPILE::TRANSLATE::TEMPLATE (3)

.ds Aq ’

NAME

XML::Compile::Translate::Template - create an XML or PERL example

CONTENTS

INHERITANCE



 XML::Compile::Translate::Template
   is a XML::Compile::Translate



SYNOPSIS



 my $schema = XML::Compile::Schema->new(...);
 print $schema->template(XML  => $type, ...);
 print $schema->template(PERL => $type, ...);

 # script as wrapper for this module
 schema2example -f XML ...



DESCRIPTION

The translator understands schemas, but does not encode that into actions. This module interprets the parse results of the translator, and creates a kind of abstract syntax tree from it, which can be used for documentational purposes. Then, it implements to ways to represent that knowledge: as an XML or a Perl example of the data-structure which the schema describes.

Extends DESCRIPTION in XML::Compile::Translate.

METHODS

Extends METHODS in XML::Compile::Translate.

DETAILS

Extends DETAILS in XML::Compile::Translate.

    Translator options

Extends Translator options in XML::Compile::Translate.

    Processing Wildcards

Wildcards are not (yet) supported.

    Schema hooks

Hooks are implemented since version 0.82. They can be used to improve the template output.

hooks executed before the template is generated

None defined yet.

hooks executed as replacement

The predefined hook COLLAPSE can be used to remove the extensive listing of some elements. Usually used with a type of which you know the structure or which is repeated often.

hooks for post-processing, after the data is collected

None defined yet.

    Typemaps

Typemaps are currently only available to improve the PERL output.

Typemaps for PERL template output

You can pass &function_name to indicate that the code reference with variable name $function_name will be called. Mind the change of & into $.

When $object_name is provided, then that object is an interface object, which will be called for the indicated type.

In case class name (any bareword will do) is specified, it is shown as a call to the toXML() instance method call from some data object of the specified class.

SEE ALSO

This module is part of XML-Compile distribution version 1.52, built on January 15, 2016. Website: http://perl.overmeer.net/xml-compile/

Other distributions in this suite: XML::Compile, XML::Compile::SOAP, XML::Compile::WSDL11, XML::Compile::SOAP12, XML::Compile::SOAP::Daemon, XML::Compile::SOAP::WSA, XML::Compile::C14N, XML::Compile::WSS, XML::Compile::WSS::Signature, XML::Compile::Tester, XML::Compile::Cache, XML::Compile::Dumper, XML::Compile::RPC, XML::Rewrite and XML::LibXML::Simple.

Please post questions or ideas to the mailinglist at http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile . For live contact with other developers, visit the #xml-compile channel on irc.perl.org.

LICENSE

Copyrights 2006-2016 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 XML::COMPILE::TRANSLATE::TEMPLATE (3) 2016-01-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.