2023-04-15 17:27:31 +00:00

42 lines
9.8 KiB
Go

//
// 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 (_g "encoding/xml";_a "fmt";_e "github.com/unidoc/unioffice";_gg "github.com/unidoc/unioffice/common/logger";);type Any struct{SimpleLiteral };
// Validate validates the ElementsGroup and its children
func (_gea *ElementsGroup )Validate ()error {return _gea .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};func (_ba *ElementsGroup )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {if _ba .Choice !=nil {for _ ,_cde :=range _ba .Choice {_cde .MarshalXML (e ,_g .StartElement {});};};return nil ;};func NewElementsGroup ()*ElementsGroup {_bd :=&ElementsGroup {};return _bd };func (_af *ElementsGroup )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_gc :for {_ded ,_bg :=d .Token ();if _bg !=nil {return _bg ;};switch _bc :=_ded .(type ){case _g .StartElement :switch _bc .Name {case _g .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"}:_gec :=NewElementsGroupChoice ();if _eg :=d .DecodeElement (&_gec .Any ,&_bc );_eg !=nil {return _eg ;};_af .Choice =append (_af .Choice ,_gec );default:_gg .Log .Debug ("\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",_bc .Name );if _faf :=d .Skip ();_faf !=nil {return _faf ;};};case _g .EndElement :break _gc ;case _g .CharData :};};return nil ;};func (_afg *ElementsGroupChoice )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {if _afg .Any !=nil {_cb :=_g .StartElement {Name :_g .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_fc :=range _afg .Any {e .EncodeElement (_fc ,_cb );};};return nil ;};func NewElementContainer ()*ElementContainer {_f :=&ElementContainer {};return _f };func (_eee *ElementsGroupChoice )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_ga :for {_ag ,_ggb :=d .Token ();if _ggb !=nil {return _ggb ;};switch _deg :=_ag .(type ){case _g .StartElement :switch _deg .Name {case _g .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"}:_fe :=NewAny ();if _ff :=d .DecodeElement (_fe ,&_deg );_ff !=nil {return _ff ;};_eee .Any =append (_eee .Any ,_fe );default:_gg .Log .Debug ("\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",_deg .Name );if _dbb :=d .Skip ();_dbb !=nil {return _dbb ;};};case _g .EndElement :break _ga ;case _g .CharData :};};return nil ;};func (_be *ElementContainer )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_cd :for {_cef ,_abe :=d .Token ();if _abe !=nil {return _abe ;};switch _fg :=_cef .(type ){case _g .StartElement :switch _fg .Name {case _g .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"}:_fa :=NewElementsGroupChoice ();if _de :=d .DecodeElement (&_fa .Any ,&_fg );_de !=nil {return _de ;};_be .Choice =append (_be .Choice ,_fa );default:_gg .Log .Debug ("\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",_fg .Name );if _db :=d .Skip ();_db !=nil {return _db ;};};case _g .EndElement :break _cd ;case _g .CharData :};};return nil ;};
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_eeaa *SimpleLiteral )ValidateWithPath (path string )error {return nil };type ElementsGroup struct{Choice []*ElementsGroupChoice ;};type ElementsGroupChoice struct{Any []*Any ;};type ElementContainer struct{Choice []*ElementsGroupChoice ;};
// Validate validates the Any and its children
func (_cac *Any )Validate ()error {return _cac .ValidateWithPath ("\u0041\u006e\u0079")};
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_ec *ElementsGroupChoice )ValidateWithPath (path string )error {for _afgf ,_bag :=range _ec .Any {if _agdd :=_bag .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_afgf ));_agdd !=nil {return _agdd ;};};return nil ;};func NewElementsGroupChoice ()*ElementsGroupChoice {_eea :=&ElementsGroupChoice {};return _eea };
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_ab *Any )ValidateWithPath (path string )error {if _dc :=_ab .SimpleLiteral .ValidateWithPath (path );_dc !=nil {return _dc ;};return nil ;};type SimpleLiteral struct{};
// Validate validates the ElementContainer and its children
func (_gd *ElementContainer )Validate ()error {return _gd .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_cfa *SimpleLiteral )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {for {_ddg ,_dbe :=d .Token ();if _dbe !=nil {return _a .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_dbe );};if _cge ,_aaf :=_ddg .(_g .EndElement );_aaf &&_cge .Name ==start .Name {break ;};};return nil ;};func NewAny ()*Any {_b :=&Any {};_b .SimpleLiteral =*NewSimpleLiteral ();return _b };
// Validate validates the ElementsGroupChoice and its children
func (_agd *ElementsGroupChoice )Validate ()error {return _agd .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func (_ca *Any )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {return _ca .SimpleLiteral .MarshalXML (e ,start );};
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
func (_gda *ElementsGroup )ValidateWithPath (path string )error {for _fd ,_gcb :=range _gda .Choice {if _aa :=_gcb .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_fd ));_aa !=nil {return _aa ;};};return nil ;};func NewSimpleLiteral ()*SimpleLiteral {_gb :=&SimpleLiteral {};return _gb };func (_gcd *SimpleLiteral )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {e .EncodeToken (start );e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};
// Validate validates the SimpleLiteral and its children
func (_cbd *SimpleLiteral )Validate ()error {return _cbd .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func (_d *Any )UnmarshalXML (d *_g .Decoder ,start _g .StartElement )error {_d .SimpleLiteral =*NewSimpleLiteral ();for {_dd ,_ce :=d .Token ();if _ce !=nil {return _a .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_ce );};if _cg ,_ge :=_dd .(_g .EndElement );_ge &&_cg .Name ==start .Name {break ;};};return nil ;};func (_ac *ElementContainer )MarshalXML (e *_g .Encoder ,start _g .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _ac .Choice !=nil {for _ ,_dcg :=range _ac .Choice {_dcg .MarshalXML (e ,_g .StartElement {});};};e .EncodeToken (_g .EndElement {Name :start .Name });return nil ;};
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_ee *ElementContainer )ValidateWithPath (path string )error {for _cea ,_bf :=range _ee .Choice {if _cfc :=_bf .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_cea ));_cfc !=nil {return _cfc ;};};return nil ;};func init (){_e .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 );_e .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 );_e .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 );_e .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 );};