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/
|
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
package elements ;import (_e "encoding/xml";_ce "fmt";_g "github.com/unidoc/unioffice";);
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-01-04 16:11:39 +00:00
|
|
|
// Validate validates the ElementsGroupChoice and its children
|
2021-03-16 20:51:18 +00:00
|
|
|
func (_ddf *ElementsGroupChoice )Validate ()error {return _ddf .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};func NewSimpleLiteral ()*SimpleLiteral {_ccg :=&SimpleLiteral {};return _ccg };
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-01-04 16:11:39 +00:00
|
|
|
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
|
2021-03-16 20:51:18 +00:00
|
|
|
func (_bde *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_beg *SimpleLiteral )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for {_bea ,_aed :=d .Token ();if _aed !=nil {return _ce .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_aed );};if _aeda ,_bga :=_bea .(_e .EndElement );_bga &&_aeda .Name ==start .Name {break ;};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
// Validate validates the ElementContainer and its children
|
|
|
|
func (_aa *ElementContainer )Validate ()error {return _aa .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};type Any struct{SimpleLiteral };func (_ebf *ElementsGroupChoice )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _ebf .Any !=nil {_dc :=_e .StartElement {Name :_e .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_accd :=range _ebf .Any {e .EncodeElement (_accd ,_dc );};};return nil ;};func NewElementContainer ()*ElementContainer {_bc :=&ElementContainer {};return _bc };func (_fag *ElementsGroup )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _fag .Choice !=nil {for _ ,_bed :=range _fag .Choice {_bed .MarshalXML (e ,_e .StartElement {});};};return nil ;};func (_f *Any )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {return _f .SimpleLiteral .MarshalXML (e ,start );};func (_ac *ElementContainer )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_ca :for {_fa ,_ecb :=d .Token ();if _ecb !=nil {return _ecb ;};switch _dd :=_fa .(type ){case _e .StartElement :switch _dd .Name {case _e .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"}:_cc :=NewElementsGroupChoice ();if _gc :=d .DecodeElement (&_cc .Any ,&_dd );_gc !=nil {return _gc ;};_ac .Choice =append (_ac .Choice ,_cc );default:_g .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",_dd .Name );if _beb :=d .Skip ();_beb !=nil {return _beb ;};};case _e .EndElement :break _ca ;case _e .CharData :};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
// Validate validates the Any and its children
|
|
|
|
func (_be *Any )Validate ()error {return _be .ValidateWithPath ("\u0041\u006e\u0079")};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
|
|
|
|
func (_fac *ElementContainer )ValidateWithPath (path string )error {for _adf ,_ae :=range _fac .Choice {if _da :=_ae .ValidateWithPath (_ce .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_adf ));_da !=nil {return _da ;};};return nil ;};
|
|
|
|
|
|
|
|
// ValidateWithPath validates the Any and its children, prefixing error messages with path
|
|
|
|
func (_cb *Any )ValidateWithPath (path string )error {if _bg :=_cb .SimpleLiteral .ValidateWithPath (path );_bg !=nil {return _bg ;};return nil ;};func (_gec *SimpleLiteral )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};type ElementsGroupChoice struct{Any []*Any ;};func (_cab *ElementsGroupChoice )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_facf :for {_gfa ,_ccb :=d .Token ();if _ccb !=nil {return _ccb ;};switch _acf :=_gfa .(type ){case _e .StartElement :switch _acf .Name {case _e .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"}:_acfe :=NewAny ();if _gee :=d .DecodeElement (_acfe ,&_acf );_gee !=nil {return _gee ;};_cab .Any =append (_cab .Any ,_acfe );default:_g .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",_acf .Name );if _ab :=d .Skip ();_ab !=nil {return _ab ;};};case _e .EndElement :break _facf ;case _e .CharData :};};return nil ;};func NewAny ()*Any {_b :=&Any {};_b .SimpleLiteral =*NewSimpleLiteral ();return _b };type SimpleLiteral struct{};func (_a *ElementContainer )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _a .Choice !=nil {for _ ,_ge :=range _a .Choice {_ge .MarshalXML (e ,_e .StartElement {});};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};func NewElementsGroup ()*ElementsGroup {_ef :=&ElementsGroup {};return _ef };type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func (_eb *Any )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_eb .SimpleLiteral =*NewSimpleLiteral ();for {_ec ,_d :=d .Token ();if _d !=nil {return _ce .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_d );};if _gf ,_ed :=_ec .(_e .EndElement );_ed &&_gf .Name ==start .Name {break ;};};return nil ;};type ElementContainer struct{Choice []*ElementsGroupChoice ;};func NewElementsGroupChoice ()*ElementsGroupChoice {_af :=&ElementsGroupChoice {};return _af };
|
2020-10-12 13:59:12 +00:00
|
|
|
|
2021-01-04 16:11:39 +00:00
|
|
|
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
|
2021-03-16 20:51:18 +00:00
|
|
|
func (_fc *ElementsGroupChoice )ValidateWithPath (path string )error {for _ade ,_effg :=range _fc .Any {if _ba :=_effg .ValidateWithPath (_ce .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_ade ));_ba !=nil {return _ba ;};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
|
|
|
|
func (_edc *ElementsGroup )ValidateWithPath (path string )error {for _daa ,_acc :=range _edc .Choice {if _gd :=_acc .ValidateWithPath (_ce .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_daa ));_gd !=nil {return _gd ;};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
// Validate validates the SimpleLiteral and its children
|
|
|
|
func (_bef *SimpleLiteral )Validate ()error {return _bef .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func (_cca *ElementsGroup )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_gcf :for {_cbf ,_eff :=d .Token ();if _eff !=nil {return _eff ;};switch _db :=_cbf .(type ){case _e .StartElement :switch _db .Name {case _e .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"}:_bd :=NewElementsGroupChoice ();if _bcg :=d .DecodeElement (&_bd .Any ,&_db );_bcg !=nil {return _bcg ;};_cca .Choice =append (_cca .Choice ,_bd );default:_g .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",_db .Name );if _ee :=d .Skip ();_ee !=nil {return _ee ;};};case _e .EndElement :break _gcf ;case _e .CharData :};};return nil ;};
|
2020-08-23 14:15:53 +00:00
|
|
|
|
2021-03-16 20:51:18 +00:00
|
|
|
// Validate validates the ElementsGroup and its children
|
|
|
|
func (_gfc *ElementsGroup )Validate ()error {return _gfc .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};func init (){_g .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 );_g .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 );_g .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 );_g .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 );};
|