42 lines
9.8 KiB
Go
Raw Normal View History

2020-08-23 14:15:53 +00:00
//
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
package elements ;import (_bb "encoding/xml";_gag "fmt";_fd "github.com/unidoc/unioffice";);
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_ef *ElementsGroup )ValidateWithPath (path string )error {for _de ,_ad :=range _ef .Choice {if _dfd :=_ad .ValidateWithPath (_gag .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_de ));_dfd !=nil {return _dfd ;};};return nil ;};
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_b *ElementContainer )ValidateWithPath (path string )error {for _ddbg ,_ca :=range _b .Choice {if _af :=_ca .ValidateWithPath (_gag .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ddbg ));_af !=nil {return _af ;};};return nil ;};
// Validate validates the ElementsGroup and its children
func (_bc *ElementsGroup )Validate ()error {return _bc .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};type ElementsGroupChoice struct{Any []*Any ;};type Any struct{SimpleLiteral };
// Validate validates the ElementsGroupChoice and its children
func (_adb *ElementsGroupChoice )Validate ()error {return _adb .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func (_ge *ElementContainer )MarshalXML (e *_bb .Encoder ,start _bb .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _ge .Choice !=nil {for _ ,_ed :=range _ge .Choice {_ed .MarshalXML (e ,_bb .StartElement {});};};e .EncodeToken (_bb .EndElement {Name :start .Name });return nil ;};func NewElementsGroup ()*ElementsGroup {_be :=&ElementsGroup {};return _be };
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_dbd *SimpleLiteral )ValidateWithPath (path string )error {return nil };
// Validate validates the ElementContainer and its children
func (_fa *ElementContainer )Validate ()error {return _fa .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_ddc *Any )ValidateWithPath (path string )error {if _fe :=_ddc .SimpleLiteral .ValidateWithPath (path );_fe !=nil {return _fe ;};return nil ;};func (_ddb *ElementsGroupChoice )MarshalXML (e *_bb .Encoder ,start _bb .StartElement )error {if _ddb .Any !=nil {_ce :=_bb .StartElement {Name :_bb .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_aa :=range _ddb .Any {e .EncodeElement (_aa ,_ce );};};return nil ;};func NewAny ()*Any {_fag :=&Any {};_fag .SimpleLiteral =*NewSimpleLiteral ();return _fag };func (_ag *ElementContainer )UnmarshalXML (d *_bb .Decoder ,start _bb .StartElement )error {_gb :for {_eg ,_ff :=d .Token ();if _ff !=nil {return _ff ;};switch _bbc :=_eg .(type ){case _bb .StartElement :switch _bbc .Name {case _bb .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_gc :=NewElementsGroupChoice ();if _ga :=d .DecodeElement (&_gc .Any ,&_bbc );_ga !=nil {return _ga ;};_ag .Choice =append (_ag .Choice ,_gc );default:_fd .Log ("\u0073\u006b\u0069\u0070\u0070i\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065d\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072\u0020\u0025v",_bbc .Name );if _g :=d .Skip ();_g !=nil {return _g ;};};case _bb .EndElement :break _gb ;case _bb .CharData :};};return nil ;};func (_gca *Any )MarshalXML (e *_bb .Encoder ,start _bb .StartElement )error {return _gca .SimpleLiteral .MarshalXML (e ,start );};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_ea *ElementsGroupChoice )ValidateWithPath (path string )error {for _cfc ,_df :=range _ea .Any {if _bf :=_df .ValidateWithPath (_gag .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_cfc ));_bf !=nil {return _bf ;};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func (_bad *ElementsGroup )UnmarshalXML (d *_bb .Decoder ,start _bb .StartElement )error {_dee :for {_gea ,_geac :=d .Token ();if _geac !=nil {return _geac ;};switch _ec :=_gea .(type ){case _bb .StartElement :switch _ec .Name {case _bb .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_e :=NewElementsGroupChoice ();if _ggd :=d .DecodeElement (&_e .Any ,&_ec );_ggd !=nil {return _ggd ;};_bad .Choice =append (_bad .Choice ,_e );default:_fd .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0045\u006c\u0065\u006de\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070 \u0025\u0076",_ec .Name );if _eb :=d .Skip ();_eb !=nil {return _eb ;};};case _bb .EndElement :break _dee ;case _bb .CharData :};};return nil ;};
// Validate validates the SimpleLiteral and its children
func (_da *SimpleLiteral )Validate ()error {return _da .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};
// Validate validates the Any and its children
func (_cf *Any )Validate ()error {return _cf .ValidateWithPath ("\u0041\u006e\u0079")};func NewElementsGroupChoice ()*ElementsGroupChoice {_cg :=&ElementsGroupChoice {};return _cg };func (_bg *SimpleLiteral )UnmarshalXML (d *_bb .Decoder ,start _bb .StartElement )error {for {_dbf ,_gee :=d .Token ();if _gee !=nil {return _gag .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_gee );};if _c ,_bcf :=_dbf .(_bb .EndElement );_bcf &&_c .Name ==start .Name {break ;};};return nil ;};func (_ba *ElementsGroupChoice )UnmarshalXML (d *_bb .Decoder ,start _bb .StartElement )error {_eff :for {_ege ,_db :=d .Token ();if _db !=nil {return _db ;};switch _ffa :=_ege .(type ){case _bb .StartElement :switch _ffa .Name {case _bb .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f",Local :"\u0061\u006e\u0079"}:_a :=NewAny ();if _ee :=d .DecodeElement (_a ,&_ffa );_ee !=nil {return _ee ;};_ba .Any =append (_ba .Any ,_a );default:_fd .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067\u0020\u0075\u006e\u0073\u0075\u0070\u0070o\u0072\u0074\u0065\u0064\u0020\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020o\u006e\u0020\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072ou\u0070\u0043\u0068\u006f\u0069\u0063\u0065\u0020\u0025\u0076",_ffa .Name );if _bge :=d .Skip ();_bge !=nil {return _bge ;};};case _bb .EndElement :break _eff ;case _bb .CharData :};};return nil ;};func (_ead *Any )UnmarshalXML (d *_bb .Decoder ,start _bb .StartElement )error {_ead .SimpleLiteral =*NewSimpleLiteral ();for {_d ,_cgc :=d .Token ();if _cgc !=nil {return _gag .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_cgc );};if _cgd ,_gg :=_d .(_bb .EndElement );_gg &&_cgd .Name ==start .Name {break ;};};return nil ;};func NewSimpleLiteral ()*SimpleLiteral {_cgde :=&SimpleLiteral {};return _cgde };type ElementContainer struct{Choice []*ElementsGroupChoice ;};type SimpleLiteral struct{};func (_f *ElementsGroup )MarshalXML (e *_bb .Encoder ,start _bb .StartElement )error {if _f .Choice !=nil {for _ ,_cd :=range _f .Choice {_cd .MarshalXML (e ,_bb .StartElement {});};};return nil ;};func NewElementContainer ()*ElementContainer {_bac :=&ElementContainer {};return _bac };func (_cdd *SimpleLiteral )MarshalXML (e *_bb .Encoder ,start _bb .StartElement )error {e .EncodeToken (start );e .EncodeToken (_bb .EndElement {Name :start .Name });return nil ;};func init (){_fd .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c",NewSimpleLiteral );_fd .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072",NewElementContainer );_fd .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0061\u006e\u0079",NewAny );_fd .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0070\u0075\u0072\u006c\u002e\u006f\u0072\u0067/\u0064c\u002f\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u002f\u0031\u002e\u0031\u002f","\u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070",NewElementsGroup );};