mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-27 13:48:54 +08:00
30 lines
10 KiB
Go
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";_d "github.com/unidoc/unioffice";);
|
|
|
|
// Validate validates the CT_SchemaLibrary and its children
|
|
func (_cb *CT_SchemaLibrary )Validate ()error {return _cb .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_dfc *SchemaLibrary )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_dfc .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_fc :for {_eeb ,_cfb :=d .Token ();if _cfb !=nil {return _cfb ;};switch _bge :=_eeb .(type ){case _e .StartElement :switch _bge .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"}:_gff :=NewCT_Schema ();if _fcg :=d .DecodeElement (_gff ,&_bge );_fcg !=nil {return _fcg ;};_dfc .Schema =append (_dfc .Schema ,_gff );default:_d .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",_bge .Name );if _fbc :=d .Skip ();_fbc !=nil {return _fbc ;};};case _e .EndElement :break _fc ;case _e .CharData :};};return nil ;};
|
|
|
|
// Validate validates the CT_Schema and its children
|
|
func (_ba *CT_Schema )Validate ()error {return _ba .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func (_dd *CT_SchemaLibrary )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {e .EncodeToken (start );if _dd .Schema !=nil {_ag :=_e .StartElement {Name :_e .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_db :=range _dd .Schema {e .EncodeElement (_db ,_ag );};};e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
|
|
func (_egg *CT_SchemaLibrary )ValidateWithPath (path string )error {for _gea ,_ee :=range _egg .Schema {if _ef :=_ee .ValidateWithPath (_a .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_gea ));_ef !=nil {return _ef ;};};return nil ;};func (_agd *CT_SchemaLibrary )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {_aa :for {_cgb ,_fb :=d .Token ();if _fb !=nil {return _fb ;};switch _aea :=_cgb .(type ){case _e .StartElement :switch _aea .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"}:_gd :=NewCT_Schema ();if _gf :=d .DecodeElement (_gd ,&_aea );_gf !=nil {return _gf ;};_agd .Schema =append (_agd .Schema ,_gd );default:_d .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",_aea .Name );if _feb :=d .Skip ();_feb !=nil {return _feb ;};};case _e .EndElement :break _aa ;case _e .CharData :};};return nil ;};
|
|
|
|
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
|
|
func (_ga *SchemaLibrary )ValidateWithPath (path string )error {if _be :=_ga .CT_SchemaLibrary .ValidateWithPath (path );_be !=nil {return _be ;};return nil ;};
|
|
|
|
// Validate validates the SchemaLibrary and its children
|
|
func (_gef *SchemaLibrary )Validate ()error {return _gef .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func NewCT_Schema ()*CT_Schema {_c :=&CT_Schema {};return _c };func (_fee *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 _fee .CT_SchemaLibrary .MarshalXML (e ,start );};type SchemaLibrary struct{CT_SchemaLibrary };type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func NewSchemaLibrary ()*SchemaLibrary {_ddd :=&SchemaLibrary {};_ddd .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _ddd ;};func (_cg *CT_Schema )MarshalXML (e *_e .Encoder ,start _e .StartElement )error {if _cg .UriAttr !=nil {start .Attr =append (start .Attr ,_e .Attr {Name :_e .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_a .Sprintf ("\u0025\u0076",*_cg .UriAttr )});};if _cg .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",*_cg .ManifestLocationAttr )});};if _cg .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",*_cg .SchemaLocationAttr )});};if _cg .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",*_cg .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_e .EndElement {Name :start .Name });return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
|
|
func (_da *CT_Schema )ValidateWithPath (path string )error {return nil };type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};func (_ae *CT_Schema )UnmarshalXML (d *_e .Decoder ,start _e .StartElement )error {for _ ,_eg :=range start .Attr {if _eg .Name .Local =="\u0075\u0072\u0069"{_b ,_df :=_eg .Value ,error (nil );if _df !=nil {return _df ;};_ae .UriAttr =&_b ;continue ;};if _eg .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_ed ,_cd :=_eg .Value ,error (nil );if _cd !=nil {return _cd ;};_ae .ManifestLocationAttr =&_ed ;continue ;};if _eg .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_f ,_bb :=_eg .Value ,error (nil );if _bb !=nil {return _bb ;};_ae .SchemaLocationAttr =&_f ;continue ;};if _eg .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_bg ,_gg :=_eg .Value ,error (nil );if _gg !=nil {return _gg ;};_ae .SchemaLanguageAttr =&_bg ;continue ;};};for {_dfe ,_dff :=d .Token ();if _dff !=nil {return _a .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_dff );};if _dfb ,_ge :=_dfe .(_e .EndElement );_ge &&_dfb .Name ==start .Name {break ;};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_fe :=&CT_SchemaLibrary {};return _fe };func init (){_d .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 );_d .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 );_d .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 );}; |