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 (_a "encoding/xml";_aa "fmt";_ag "github.com/unidoc/unioffice";);
|
|
|
|
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
|
|
func (_gc *CT_Schema )ValidateWithPath (path string )error {return nil };type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};
|
|
|
|
// Validate validates the CT_Schema and its children
|
|
func (_cf *CT_Schema )Validate ()error {return _cf .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func (_ab *SchemaLibrary )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {start .Attr =append (start .Attr ,_a .Attr {Name :_a .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 ,_a .Attr {Name :_a .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 ,_a .Attr {Name :_a .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 _ab .CT_SchemaLibrary .MarshalXML (e ,start );};type SchemaLibrary struct{CT_SchemaLibrary };func (_ea *CT_SchemaLibrary )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_ff :for {_dff ,_cdg :=d .Token ();if _cdg !=nil {return _cdg ;};switch _ec :=_dff .(type ){case _a .StartElement :switch _ec .Name {case _a .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"}:_ac :=NewCT_Schema ();if _gff :=d .DecodeElement (_ac ,&_ec );_gff !=nil {return _gff ;};_ea .Schema =append (_ea .Schema ,_ac );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\u0043\u0054\u005f\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079\u0020\u0025v",_ec .Name );if _dfg :=d .Skip ();_dfg !=nil {return _dfg ;};};case _a .EndElement :break _ff ;case _a .CharData :};};return nil ;};func NewSchemaLibrary ()*SchemaLibrary {_cdf :=&SchemaLibrary {};_cdf .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _cdf ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_gf :=&CT_SchemaLibrary {};return _gf };func (_abd *SchemaLibrary )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {_abd .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_bb :for {_eea ,_cc :=d .Token ();if _cc !=nil {return _cc ;};switch _ga :=_eea .(type ){case _a .StartElement :switch _ga .Name {case _a .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"}:_fce :=NewCT_Schema ();if _ae :=d .DecodeElement (_fce ,&_ga );_ae !=nil {return _ae ;};_abd .Schema =append (_abd .Schema ,_fce );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\u0053\u0063\u0068\u0065m\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079 \u0025\u0076",_ga .Name );if _gd :=d .Skip ();_gd !=nil {return _gd ;};};case _a .EndElement :break _bb ;case _a .CharData :};};return nil ;};
|
|
|
|
// Validate validates the SchemaLibrary and its children
|
|
func (_dc *SchemaLibrary )Validate ()error {return _dc .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_e *CT_Schema )UnmarshalXML (d *_a .Decoder ,start _a .StartElement )error {for _ ,_ef :=range start .Attr {if _ef .Name .Local =="\u0075\u0072\u0069"{_fc ,_ee :=_ef .Value ,error (nil );if _ee !=nil {return _ee ;};_e .UriAttr =&_fc ;continue ;};if _ef .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_fd ,_d :=_ef .Value ,error (nil );if _d !=nil {return _d ;};_e .ManifestLocationAttr =&_fd ;continue ;};if _ef .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_ad ,_b :=_ef .Value ,error (nil );if _b !=nil {return _b ;};_e .SchemaLocationAttr =&_ad ;continue ;};if _ef .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_db ,_ge :=_ef .Value ,error (nil );if _ge !=nil {return _ge ;};_e .SchemaLanguageAttr =&_db ;continue ;};};for {_de ,_da :=d .Token ();if _da !=nil {return _aa .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_da );};if _ce ,_df :=_de .(_a .EndElement );_df &&_ce .Name ==start .Name {break ;};};return nil ;};func NewCT_Schema ()*CT_Schema {_aac :=&CT_Schema {};return _aac };
|
|
|
|
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
|
|
func (_bg *CT_SchemaLibrary )ValidateWithPath (path string )error {for _dab ,_fg :=range _bg .Schema {if _fcf :=_fg .ValidateWithPath (_aa .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_dab ));_fcf !=nil {return _fcf ;};};return nil ;};func (_f *CT_Schema )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {if _f .UriAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_aa .Sprintf ("\u0025\u0076",*_f .UriAttr )});};if _f .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_aa .Sprintf ("\u0025\u0076",*_f .ManifestLocationAttr )});};if _f .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_aa .Sprintf ("\u0025\u0076",*_f .SchemaLocationAttr )});};if _f .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_a .Attr {Name :_a .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_aa .Sprintf ("\u0025\u0076",*_f .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};
|
|
|
|
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
|
|
func (_ced *SchemaLibrary )ValidateWithPath (path string )error {if _cef :=_ced .CT_SchemaLibrary .ValidateWithPath (path );_cef !=nil {return _cef ;};return nil ;};
|
|
|
|
// Validate validates the CT_SchemaLibrary and its children
|
|
func (_af *CT_SchemaLibrary )Validate ()error {return _af .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_ca *CT_SchemaLibrary )MarshalXML (e *_a .Encoder ,start _a .StartElement )error {e .EncodeToken (start );if _ca .Schema !=nil {_agg :=_a .StartElement {Name :_a .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_eff :=range _ca .Schema {e .EncodeElement (_eff ,_agg );};};e .EncodeToken (_a .EndElement {Name :start .Name });return nil ;};func init (){_ag .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 );_ag .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 );_ag .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 );}; |