42 lines
9.7 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/
2021-08-23 20:44:48 +00:00
package elements ;import (_d "encoding/xml";_ad "fmt";_ag "github.com/unidoc/unioffice";);
// ValidateWithPath validates the ElementsGroupChoice and its children, prefixing error messages with path
func (_ge *ElementsGroupChoice )ValidateWithPath (path string )error {for _gade ,_ec :=range _ge .Any {if _bda :=_ec .ValidateWithPath (_ad .Sprintf ("\u0025\u0073\u002f\u0041\u006e\u0079\u005b\u0025\u0064\u005d",path ,_gade ));_bda !=nil {return _bda ;};};return nil ;};
2020-08-23 14:15:53 +00:00
2021-07-30 17:03:26 +00:00
// ValidateWithPath validates the ElementsGroup and its children, prefixing error messages with path
2021-08-23 20:44:48 +00:00
func (_agf *ElementsGroup )ValidateWithPath (path string )error {for _daea ,_bd :=range _agf .Choice {if _ba :=_bd .ValidateWithPath (_ad .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_daea ));_ba !=nil {return _ba ;};};return nil ;};type ElementsGroup struct{Choice []*ElementsGroupChoice ;};func (_ea *ElementContainer )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Name .Local ="\u0065\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072";e .EncodeToken (start );if _ea .Choice !=nil {for _ ,_cd :=range _ea .Choice {_cd .MarshalXML (e ,_d .StartElement {});};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
2021-03-16 20:51:18 +00:00
2021-08-23 20:44:48 +00:00
// Validate validates the ElementsGroupChoice and its children
func (_be *ElementsGroupChoice )Validate ()error {return _be .ValidateWithPath ("\u0045\u006c\u0065\u006den\u0074\u0073\u0047\u0072\u006f\u0075\u0070\u0043\u0068\u006f\u0069\u0063\u0065");};
2021-06-16 07:10:52 +00:00
2021-08-23 20:44:48 +00:00
// ValidateWithPath validates the ElementContainer and its children, prefixing error messages with path
func (_ab *ElementContainer )ValidateWithPath (path string )error {for _gad ,_agg :=range _ab .Choice {if _cc :=_agg .ValidateWithPath (_ad .Sprintf ("\u0025\u0073\u002f\u0043\u0068\u006f\u0069\u0063\u0065\u005b\u0025\u0064\u005d",path ,_gad ));_cc !=nil {return _cc ;};};return nil ;};
2021-06-16 07:10:52 +00:00
// Validate validates the ElementContainer and its children
2021-08-23 20:44:48 +00:00
func (_fa *ElementContainer )Validate ()error {return _fa .ValidateWithPath ("\u0045\u006ce\u006d\u0065\u006et\u0043\u006f\u006e\u0074\u0061\u0069\u006e\u0065\u0072");};func NewElementsGroup ()*ElementsGroup {_fg :=&ElementsGroup {};return _fg };
2020-10-12 13:59:12 +00:00
2021-08-23 20:44:48 +00:00
// ValidateWithPath validates the Any and its children, prefixing error messages with path
func (_bg *Any )ValidateWithPath (path string )error {if _dd :=_bg .SimpleLiteral .ValidateWithPath (path );_dd !=nil {return _dd ;};return nil ;};func (_de *ElementsGroupChoice )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_gd :for {_dff ,_dee :=d .Token ();if _dee !=nil {return _dee ;};switch _aab :=_dff .(type ){case _d .StartElement :switch _aab .Name {case _d .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"}:_fb :=NewAny ();if _cgb :=d .DecodeElement (_fb ,&_aab );_cgb !=nil {return _cgb ;};_de .Any =append (_de .Any ,_fb );default:_ag .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",_aab .Name );if _cgc :=d .Skip ();_cgc !=nil {return _cgc ;};};case _d .EndElement :break _gd ;case _d .CharData :};};return nil ;};
2021-05-31 16:22:30 +00:00
2021-08-23 20:44:48 +00:00
// Validate validates the Any and its children
func (_gb *Any )Validate ()error {return _gb .ValidateWithPath ("\u0041\u006e\u0079")};func (_ca *ElementsGroupChoice )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _ca .Any !=nil {_bf :=_d .StartElement {Name :_d .Name {Local :"\u0064\u0063\u003a\u0061\u006e\u0079"}};for _ ,_ddb :=range _ca .Any {e .EncodeElement (_ddb ,_bf );};};return nil ;};
2021-06-16 07:10:52 +00:00
// Validate validates the SimpleLiteral and its children
2021-08-23 20:44:48 +00:00
func (_fe *SimpleLiteral )Validate ()error {return _fe .ValidateWithPath ("\u0053\u0069\u006d\u0070\u006c\u0065\u004c\u0069\u0074\u0065\u0072\u0061\u006c");};func (_caf *SimpleLiteral )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func NewElementsGroupChoice ()*ElementsGroupChoice {_ffa :=&ElementsGroupChoice {};return _ffa };func (_dc *Any )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {return _dc .SimpleLiteral .MarshalXML (e ,start );};
2021-07-30 17:03:26 +00:00
2021-08-23 20:44:48 +00:00
// Validate validates the ElementsGroup and its children
func (_cbc *ElementsGroup )Validate ()error {return _cbc .ValidateWithPath ("\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0073\u0047\u0072\u006f\u0075\u0070");};type SimpleLiteral struct{};func (_b *Any )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_b .SimpleLiteral =*NewSimpleLiteral ();for {_g ,_ga :=d .Token ();if _ga !=nil {return _ad .Errorf ("\u0070a\u0072s\u0069\u006e\u0067\u0020\u0041\u006e\u0079\u003a\u0020\u0025\u0073",_ga );};if _cb ,_e :=_g .(_d .EndElement );_e &&_cb .Name ==start .Name {break ;};};return nil ;};type ElementsGroupChoice struct{Any []*Any ;};func NewSimpleLiteral ()*SimpleLiteral {_geb :=&SimpleLiteral {};return _geb };func (_f *ElementContainer )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_ff :for {_dca ,_age :=d .Token ();if _age !=nil {return _age ;};switch _ade :=_dca .(type ){case _d .StartElement :switch _ade .Name {case _d .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"}:_gac :=NewElementsGroupChoice ();if _dg :=d .DecodeElement (&_gac .Any ,&_ade );_dg !=nil {return _dg ;};_f .Choice =append (_f .Choice ,_gac );default:_ag .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",_ade .Name );if _eg :=d .Skip ();_eg !=nil {return _eg ;};};case _d .EndElement :break _ff ;case _d .CharData :};};return nil ;};
2021-07-30 17:03:26 +00:00
2021-08-23 20:44:48 +00:00
// ValidateWithPath validates the SimpleLiteral and its children, prefixing error messages with path
func (_bad *SimpleLiteral )ValidateWithPath (path string )error {return nil };func (_bef *SimpleLiteral )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for {_fga ,_eab :=d .Token ();if _eab !=nil {return _ad .Errorf ("\u0070a\u0072\u0073\u0069\u006eg\u0020\u0053\u0069\u006d\u0070l\u0065L\u0069t\u0065\u0072\u0061\u006c\u003a\u0020\u0025s",_eab );};if _dad ,_ae :=_fga .(_d .EndElement );_ae &&_dad .Name ==start .Name {break ;};};return nil ;};func (_gc *ElementsGroup )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fae :for {_cf ,_ege :=d .Token ();if _ege !=nil {return _ege ;};switch _aa :=_cf .(type ){case _d .StartElement :switch _aa .Name {case _d .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"}:_ddd :=NewElementsGroupChoice ();if _df :=d .DecodeElement (&_ddd .Any ,&_aa );_df !=nil {return _df ;};_gc .Choice =append (_gc .Choice ,_ddd );default:_ag .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",_aa .Name );if _gbe :=d .Skip ();_gbe !=nil {return _gbe ;};};case _d .EndElement :break _fae ;case _d .CharData :};};return nil ;};func NewAny ()*Any {_c :=&Any {};_c .SimpleLiteral =*NewSimpleLiteral ();return _c };func NewElementContainer ()*ElementContainer {_da :=&ElementContainer {};return _da };type ElementContainer struct{Choice []*ElementsGroupChoice ;};type Any struct{SimpleLiteral };func (_ee *ElementsGroup )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _ee .Choice !=nil {for _ ,_cbb :=range _ee .Choice {_cbb .MarshalXML (e ,_d .StartElement {});};};return nil ;};func init (){_ag .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 );_ag .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 );_ag .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 );_ag .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 );};