unioffice/schema/soo/schemaLibrary/schemaLibrary.go
2020-08-23 14:15:53 +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 (_dd "encoding/xml";_bec "fmt";_efa "github.com/unidoc/unioffice";);type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func NewCT_Schema ()*CT_Schema {_cg :=&CT_Schema {};return _cg };func (_d *SchemaLibrary )UnmarshalXML (d *_dd .Decoder ,start _dd .StartElement )error {_d .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_fg :for {_e ,_a :=d .Token ();if _a !=nil {return _a ;};switch _bcg :=_e .(type ){case _dd .StartElement :switch _bcg .Name {case _dd .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"}:_ce :=NewCT_Schema ();if _eaa :=d .DecodeElement (_ce ,&_bcg );_eaa !=nil {return _eaa ;};_d .Schema =append (_d .Schema ,_ce );default:_efa .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\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_bcg .Name );if _ffe :=d .Skip ();_ffe !=nil {return _ffe ;};};case _dd .EndElement :break _fg ;case _dd .CharData :};};return nil ;};func (_bd *CT_SchemaLibrary )UnmarshalXML (d *_dd .Decoder ,start _dd .StartElement )error {_dff :for {_cab ,_be :=d .Token ();if _be !=nil {return _be ;};switch _dc :=_cab .(type ){case _dd .StartElement :switch _dc .Name {case _dd .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"}:_dg :=NewCT_Schema ();if _eag :=d .DecodeElement (_dg ,&_dc );_eag !=nil {return _eag ;};_bd .Schema =append (_bd .Schema ,_dg );default:_efa .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\u0043\u0054\u005f\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_dc .Name );if _cf :=d .Skip ();_cf !=nil {return _cf ;};};case _dd .EndElement :break _dff ;case _dd .CharData :};};return nil ;};
// Validate validates the SchemaLibrary and its children
func (_cbd *SchemaLibrary )Validate ()error {return _cbd .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
func (_ad *CT_Schema )ValidateWithPath (path string )error {return nil };func (_bag *CT_Schema )MarshalXML (e *_dd .Encoder ,start _dd .StartElement )error {if _bag .UriAttr !=nil {start .Attr =append (start .Attr ,_dd .Attr {Name :_dd .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_bec .Sprintf ("\u0025\u0076",*_bag .UriAttr )});};if _bag .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_dd .Attr {Name :_dd .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_bec .Sprintf ("\u0025\u0076",*_bag .ManifestLocationAttr )});};if _bag .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_dd .Attr {Name :_dd .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_bec .Sprintf ("\u0025\u0076",*_bag .SchemaLocationAttr )});};if _bag .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_dd .Attr {Name :_dd .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_bec .Sprintf ("\u0025\u0076",*_bag .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_dd .EndElement {Name :start .Name });return nil ;};
// Validate validates the CT_SchemaLibrary and its children
func (_g *CT_SchemaLibrary )Validate ()error {return _g .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_fc *CT_Schema )UnmarshalXML (d *_dd .Decoder ,start _dd .StartElement )error {for _ ,_fe :=range start .Attr {if _fe .Name .Local =="\u0075\u0072\u0069"{_ef ,_ff :=_fe .Value ,error (nil );if _ff !=nil {return _ff ;};_fc .UriAttr =&_ef ;continue ;};if _fe .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_fgb ,_bab :=_fe .Value ,error (nil );if _bab !=nil {return _bab ;};_fc .ManifestLocationAttr =&_fgb ;continue ;};if _fe .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_eac ,_fb :=_fe .Value ,error (nil );if _fb !=nil {return _fb ;};_fc .SchemaLocationAttr =&_eac ;continue ;};if _fe .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_bf ,_dfg :=_fe .Value ,error (nil );if _dfg !=nil {return _dfg ;};_fc .SchemaLanguageAttr =&_bf ;continue ;};};for {_bce ,_df :=d .Token ();if _df !=nil {return _bec .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_df );};if _cgg ,_bc :=_bce .(_dd .EndElement );_bc &&_cgg .Name ==start .Name {break ;};};return nil ;};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};func NewSchemaLibrary ()*SchemaLibrary {_ed :=&SchemaLibrary {};_ed .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _ed ;};func (_bbg *CT_SchemaLibrary )MarshalXML (e *_dd .Encoder ,start _dd .StartElement )error {e .EncodeToken (start );if _bbg .Schema !=nil {_b :=_dd .StartElement {Name :_dd .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_cb :=range _bbg .Schema {e .EncodeElement (_cb ,_b );};};e .EncodeToken (_dd .EndElement {Name :start .Name });return nil ;};func (_f *SchemaLibrary )MarshalXML (e *_dd .Encoder ,start _dd .StartElement )error {start .Attr =append (start .Attr ,_dd .Attr {Name :_dd .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 ,_dd .Attr {Name :_dd .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 ,_dd .Attr {Name :_dd .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 _f .CT_SchemaLibrary .MarshalXML (e ,start );};
// Validate validates the CT_Schema and its children
func (_cag *CT_Schema )Validate ()error {return _cag .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_ea :=&CT_SchemaLibrary {};return _ea };
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
func (_ca *SchemaLibrary )ValidateWithPath (path string )error {if _gb :=_ca .CT_SchemaLibrary .ValidateWithPath (path );_gb !=nil {return _gb ;};return nil ;};
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
func (_de *CT_SchemaLibrary )ValidateWithPath (path string )error {for _gbd ,_ba :=range _de .Schema {if _c :=_ba .ValidateWithPath (_bec .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_gbd ));_c !=nil {return _c ;};};return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };func init (){_efa .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 );_efa .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 );_efa .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 );};