From papowell at astart.com Sat Mar 17 14:06:49 2018 From: papowell at astart.com (Patrick Powell) Date: Sat, 17 Mar 2018 07:06:49 -0700 Subject: [Xml-compile] Modifying Examle (Template) Output Message-ID: <1ea55d94-f180-b112-d5c0-824bb9975179@astart.com> The 'example' or 'template' output has been a major life ksaver (or at least my sanity saver). However (why is there always a pause before the However?)... I need to modify the format of the output.? In the XML Compile Template POD there is a hint that: ? 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. Here is what I would like to do: 1.? put the closing ] or } for a complex object example on a separate line 2.? Append the name of the complex object in a comment after the closing ] or } Example: $errorReport = # Describing complex testdata:errorReportMsg #???? {http://www.exmaple.com/testdata}errorReportMsg # xmlns:testdata http://www.specsol.com/rmisatmsdata # xmlns:xs??????? http://www.w3.org/2001/XMLSchema # is a testdata:ErrorReport { # sequence of organization_information, ? #?? organization_requesting ? # is a xs:string ? organization_information => "example", ? # is a xs:string ? organization_requesting => "example", } # testdata:ErrorReport ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Modified output ; -- Patrick Powell Astart Technologies papowell at astart.com 1530 Jamacha Rd, Suite X Network and System San Diego, CA 92019 Consulting Cell 858-518-7581 FAX 858-751-2435 Web: papowell at astart dot com From mark at overmeer.net Sat Mar 17 23:08:53 2018 From: mark at overmeer.net (Mark Overmeer) Date: Sun, 18 Mar 2018 00:08:53 +0100 Subject: [Xml-compile] Modifying Examle (Template) Output In-Reply-To: <1ea55d94-f180-b112-d5c0-824bb9975179@astart.com> References: <1ea55d94-f180-b112-d5c0-824bb9975179@astart.com> Message-ID: <20180317230853.GB8649@moon.overmeer.net> * Patrick Powell (papowell at astart.com) [180317 14:07]: > The 'example' or 'template' output has been a major life ksaver (or at least > my sanity saver). > > Here is what I would like to do: > > 1.? put the closing ] or } for a complex object example on a separate line > 2.? Append the name of the complex object in a comment after the closing ] > or } XML-Compile (and soon the other modules as well) is available from GIT in "raw" format (unprocessed manual pages) at https://github.com/markov2/perl5-XML-Compile.git I have created an "output_style => 2" option for you. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark at Overmeer.net solutions at overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net