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/
|
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
package elements ;import (_b "encoding/xml";_ac "fmt";_e "github.com/unidoc/unioffice";);type ElementContainer struct{Choice []*ElementsGroupChoice ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
|
|
|
|
func (_be *ElementsGroupChoice )ValidateWithPath (path string )error {for _fcc ,_bff :=range _be .Any {if _fcd :=_bff .ValidateWithPath (_ac .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_fcc ));_fcd !=nil {return _fcd ;};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func NewAny ()*Any {_f :=&Any {};_f .SimpleLiteral =*NewSimpleLiteral ();return _f };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// Validate validates the ElementsGroupChoice and its children
|
|
|
|
func (_dcc *ElementsGroupChoice )Validate ()error {return _dcc .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func (_eeg *ElementsGroupChoice )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {if _eeg .Any !=nil {_df :=_b .StartElement {Name :_b .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_cb :=range _eeg .Any {e .EncodeElement (_cb ,_df );};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
|
|
|
|
func (_cge *ElementContainer )ValidateWithPath (path string )error {for _ee ,_eea :=range _cge .Choice {if _gf :=_eea .ValidateWithPath (_ac .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_ee ));_gf !=nil {return _gf ;};};return nil ;};type ElementsGroupChoice struct{Any []*Any ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// ValidateWithPath validates the Any and its children, prefixing error messages with path
|
|
|
|
func (_g *Any )ValidateWithPath (path string )error {if _fc :=_g .SimpleLiteral .ValidateWithPath (path );_fc !=nil {return _fc ;};return nil ;};func NewElementsGroupChoice ()*ElementsGroupChoice {_abgc :=&ElementsGroupChoice {};return _abgc };func (_fb *ElementContainer )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _fb .Choice !=nil {for _ ,_ede :=range _fb .Choice {_ede .MarshalXML (e ,_b .StartElement {});};};e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// Validate validates the Any and its children
|
|
|
|
func (_bcb *Any )Validate ()error {return _bcb .ValidateWithPath ("\u0041\u006e\u0079")};type SimpleLiteral struct{};func (_c *ElementContainer )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_gd :for {_ge ,_cg :=d .Token ();if _cg !=nil {return _cg ;};switch _edb :=_ge .(type ){case _b .StartElement :switch _edb .Name {case _b .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"}:_abc :=NewElementsGroupChoice ();if _ea :=d .DecodeElement (&_abc .Any ,&_edb );_ea !=nil {return _ea ;};_c .Choice =append (_c .Choice ,_abc );default:_e .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",_edb .Name );if _cf :=d .Skip ();_cf !=nil {return _cf ;};};case _b .EndElement :break _gd ;case _b .CharData :};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
|
|
|
// Validate validates the ElementContainer and its children
|
2020-08-31 22:58:25 +00:00
|
|
|
func (_cgf *ElementContainer )Validate ()error {return _cgf .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func (_bb *ElementsGroup )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {if _bb .Choice !=nil {for _ ,_bgd :=range _bb .Choice {_bgd .MarshalXML (e ,_b .StartElement {});};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// Validate validates the SimpleLiteral and its children
|
|
|
|
func (_gbd *SimpleLiteral )Validate ()error {return _gbd .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
|
|
|
|
func (_ce *ElementsGroup )ValidateWithPath (path string )error {for _gb ,_dca :=range _ce .Choice {if _gee :=_dca .ValidateWithPath (_ac .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_gb ));_gee !=nil {return _gee ;};};return nil ;};func NewElementsGroup ()*ElementsGroup {_bg :=&ElementsGroup {};return _bg };func (_gg *ElementsGroup )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_de :for {_da ,_eda :=d .Token ();if _eda !=nil {return _eda ;};switch _dc :=_da .(type ){case _b .StartElement :switch _dc .Name {case _b .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"}:_ead :=NewElementsGroupChoice ();if _fg :=d .DecodeElement (&_ead .Any ,&_dc );_fg !=nil {return _fg ;};_gg .Choice =append (_gg .Choice ,_ead );default:_e .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",_dc .Name );if _gfc :=d .Skip ();_gfc !=nil {return _gfc ;};};case _b .EndElement :break _de ;case _b .CharData :};};return nil ;};func NewSimpleLiteral ()*SimpleLiteral {_ga :=&SimpleLiteral {};return _ga };func (_eg *Any )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {return _eg .SimpleLiteral .MarshalXML (e ,start );};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
|
|
|
|
func (_fac *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_baa *SimpleLiteral )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};func NewElementContainer ()*ElementContainer {_d :=&ElementContainer {};return _d };func (_fd *ElementsGroupChoice )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ba :for {_fda ,_bd :=d .Token ();if _bd !=nil {return _bd ;};switch _cgee :=_fda .(type ){case _b .StartElement :switch _cgee .Name {case _b .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"}:_fba :=NewAny ();if _ec :=d .DecodeElement (_fba ,&_cgee );_ec !=nil {return _ec ;};_fd .Any =append (_fd .Any ,_fba );default:_e .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",_cgee .Name );if _gff :=d .Skip ();_gff !=nil {return _gff ;};};case _b .EndElement :break _ba ;case _b .CharData :};};return nil ;};type Any struct{SimpleLiteral };func (_dag *SimpleLiteral )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {for {_faa ,_fdf :=d .Token ();if _fdf !=nil {return _ac .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_fdf );};if _dce ,_bgg :=_faa .(_b .EndElement );_bgg &&_dce .Name ==start .Name {break ;};};return nil ;};func (_egb *Any )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_egb .SimpleLiteral =*NewSimpleLiteral ();for {_ed ,_ef :=d .Token ();if _ef !=nil {return _ac .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_ef );};if _bf ,_bc :=_ed .(_b .EndElement );_bc &&_bf .Name ==start .Name {break ;};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2020-08-31 22:58:25 +00:00
|
|
|
// Validate validates the ElementsGroup and its children
|
|
|
|
func (_fa *ElementsGroup )Validate ()error {return _fa .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};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 );};
|