unioffice/schema/soo/schemaLibrary/schemaLibrary.go
2023-04-15 17:27:31 +00:00

30 lines
10 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 schemaLibrary ;import (_e "encoding/xml";_a "fmt";_c "github.com/unidoc/unioffice";_b "github.com/unidoc/unioffice/common/logger";);type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func (_gc *CT_SchemaLibrary )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {e .EncodeToken (start );if _gc .Schema !=nil {_fca :=_e .StartElement {Name :_e .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_fb :=range _gc .Schema {e .EncodeElement (_fb ,_fca );};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// Validate validates the SchemaLibrary and its children
func (_bbe *SchemaLibrary )Validate ()error {return _bbe .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_ca *CT_Schema )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for _ ,_gg :=range start .Attr {if _gg .Name .Local =="\u0075\u0072\u0069"{_gf ,_ad :=_gg .Value ,error (nil );if _ad !=nil {return _ad ;};_ca .UriAttr =&_gf ;continue ;};if _gg .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_cg ,_ag :=_gg .Value ,error (nil );if _ag !=nil {return _ag ;};_ca .ManifestLocationAttr =&_cg ;continue ;};if _gg .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_ae ,_ab :=_gg .Value ,error (nil );if _ab !=nil {return _ab ;};_ca .SchemaLocationAttr =&_ae ;continue ;};if _gg .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_cf ,_f :=_gg .Value ,error (nil );if _f !=nil {return _f ;};_ca .SchemaLanguageAttr =&_cf ;continue ;};};for {_ff ,_af :=d .Token ();if _af !=nil {return _a .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_af );};if _bb ,_be :=_ff .(_e .EndElement );_be &&_bb .Name ==start .Name {break ;};};return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_agf *CT_Schema )ValidateWithPath (path string )error {return nil };func (_dge *SchemaLibrary )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_dge .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_fbf :for {_cgg ,_cad :=d .Token ();if _cad !=nil {return _cad ;};switch _ffd :=_cgg .(type ){case _e .StartElement :switch _ffd .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_aba :=NewCT_Schema ();if _afg :=d .DecodeElement (_aba ,&_ffd );_afg !=nil {return _afg ;};_dge .Schema =append (_dge .Schema ,_aba );default:_b .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\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_ffd .Name );if _cdg :=d .Skip ();_cdg !=nil {return _cdg ;};};case _e .EndElement :break _fbf ;case _e .CharData :};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_fc :=&CT_SchemaLibrary {};return _fc };func NewCT_Schema ()*CT_Schema {_ee :=&CT_Schema {};return _ee };func (_caa *CT_SchemaLibrary )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_aee :for {_eea ,_gfd :=d .Token ();if _gfd !=nil {return _gfd ;};switch _db :=_eea .(type ){case _e .StartElement :switch _db .Name {case _e .Name {Space :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e",Local :"\u0073\u0063\u0068\u0065\u006d\u0061"}:_bd :=NewCT_Schema ();if _bf :=d .DecodeElement (_bd ,&_db );_bf !=nil {return _bf ;};_caa .Schema =append (_caa .Schema ,_bd );default:_b .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\u0043\u0054\u005f\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_db .Name );if _gfb :=d .Skip ();_gfb !=nil {return _gfb ;};};case _e .EndElement :break _aee ;case _e .CharData :};};return nil ;};
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_df *SchemaLibrary )ValidateWithPath (path string )error {if _dbb :=_df .CT_SchemaLibrary .ValidateWithPath (path );_dbb !=nil {return _dbb ;};return nil ;};func (_g *CT_Schema )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _g .UriAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_a .Sprintf ("\u0025\u0076",*_g .UriAttr )});};if _g .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_a .Sprintf ("\u0025\u0076",*_g .ManifestLocationAttr )});};if _g .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_a .Sprintf ("\u0025\u0076",*_g .SchemaLocationAttr )});};if _g .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_a .Sprintf ("\u0025\u0076",*_g .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_Schema and its children
func (_abg *CT_Schema )Validate ()error {return _abg .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func NewSchemaLibrary ()*SchemaLibrary {_bg :=&SchemaLibrary {};_bg .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _bg ;};func (_fd *SchemaLibrary )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u006d\u0061"},Value :"\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e"});start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u006d\u0061:\u0073\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079";return _fd .CT_SchemaLibrary .MarshalXML (e ,start );};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
func (_ada *CT_SchemaLibrary )ValidateWithPath (path string )error {for _ce ,_dd :=range _ada .Schema {if _dgc :=_dd .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_ce ));_dgc !=nil {return _dgc ;};};return nil ;};
// Validate validates the CT_SchemaLibrary and its children
func (_dba *CT_SchemaLibrary )Validate ()error {return _dba .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func init (){_c .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043T\u005f\u0053\u0063\u0068\u0065\u006da",NewCT_Schema );_c .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewCT_SchemaLibrary );_c .RegisterConstructor ("\u0068\u0074\u0074\u0070:\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073.\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u0073\u0063\u0068\u0065\u006da\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u002f\u0032\u0030\u0030\u0036\u002f\u006d\u0061\u0069\u006e","\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079",NewSchemaLibrary );};