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 (_c "encoding/xml";_ge "fmt";_e "github.com/unidoc/unioffice";);func (_aag *CT_SchemaLibrary )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_db :for {_bg ,_bcg :=d .Token ();if _bcg !=nil {return _bcg ;};switch _bf :=_bg .(type ){case _c .StartElement :switch _bf .Name {case _c .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"}:_be :=NewCT_Schema ();if _dge :=d .DecodeElement (_be ,&_bf );_dge !=nil {return _dge ;};_aag .Schema =append (_aag .Schema ,_be );default:_e .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",_bf .Name );if _bcb :=d .Skip ();_bcb !=nil {return _bcb ;};};case _c .EndElement :break _db ;case _c .CharData :};};return nil ;};
|
|
|
|
// Validate validates the CT_SchemaLibrary and its children
|
|
func (_cg *CT_SchemaLibrary )Validate ()error {return _cg .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};type SchemaLibrary struct{CT_SchemaLibrary };
|
|
|
|
// Validate validates the CT_Schema and its children
|
|
func (_ff *CT_Schema )Validate ()error {return _ff .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};func (_ga *CT_Schema )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {if _ga .UriAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_ge .Sprintf ("\u0025\u0076",*_ga .UriAttr )});};if _ga .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_ge .Sprintf ("\u0025\u0076",*_ga .ManifestLocationAttr )});};if _ga .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_ge .Sprintf ("\u0025\u0076",*_ga .SchemaLocationAttr )});};if _ga .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_ge .Sprintf ("\u0025\u0076",*_ga .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};func (_adc *SchemaLibrary )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_adc .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_fbc :for {_fbca ,_gcg :=d .Token ();if _gcg !=nil {return _gcg ;};switch _eef :=_fbca .(type ){case _c .StartElement :switch _eef .Name {case _c .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"}:_fbcc :=NewCT_Schema ();if _fde :=d .DecodeElement (_fbcc ,&_eef );_fde !=nil {return _fde ;};_adc .Schema =append (_adc .Schema ,_fbcc );default:_e .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",_eef .Name );if _dd :=d .Skip ();_dd !=nil {return _dd ;};};case _c .EndElement :break _fbc ;case _c .CharData :};};return nil ;};func (_ee *CT_SchemaLibrary )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {e .EncodeToken (start );if _ee .Schema !=nil {_ef :=_c .StartElement {Name :_c .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_ade :=range _ee .Schema {e .EncodeElement (_ade ,_ef );};};e .EncodeToken (_c .EndElement {Name :start .Name });return nil ;};
|
|
|
|
// Validate validates the SchemaLibrary and its children
|
|
func (_da *SchemaLibrary )Validate ()error {return _da .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func NewSchemaLibrary ()*SchemaLibrary {_fbd :=&SchemaLibrary {};_fbd .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _fbd ;};
|
|
|
|
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
|
|
func (_gc *CT_SchemaLibrary )ValidateWithPath (path string )error {for _dgg ,_ba :=range _gc .Schema {if _df :=_ba .ValidateWithPath (_ge .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_dgg ));_df !=nil {return _df ;};};return nil ;};func (_ce *CT_Schema )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {for _ ,_a :=range start .Attr {if _a .Name .Local =="\u0075\u0072\u0069"{_ad ,_f :=_a .Value ,error (nil );if _f !=nil {return _f ;};_ce .UriAttr =&_ad ;continue ;};if _a .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_bd ,_aa :=_a .Value ,error (nil );if _aa !=nil {return _aa ;};_ce .ManifestLocationAttr =&_bd ;continue ;};if _a .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_gd ,_d :=_a .Value ,error (nil );if _d !=nil {return _d ;};_ce .SchemaLocationAttr =&_gd ;continue ;};if _a .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_dg ,_fa :=_a .Value ,error (nil );if _fa !=nil {return _fa ;};_ce .SchemaLanguageAttr =&_dg ;continue ;};};for {_bc ,_fac :=d .Token ();if _fac !=nil {return _ge .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_fac );};if _ac ,_fb :=_bc .(_c .EndElement );_fb &&_ac .Name ==start .Name {break ;};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_ced :=&CT_SchemaLibrary {};return _ced };
|
|
|
|
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
|
|
func (_dac *SchemaLibrary )ValidateWithPath (path string )error {if _cc :=_dac .CT_SchemaLibrary .ValidateWithPath (path );_cc !=nil {return _cc ;};return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
|
|
func (_fd *CT_Schema )ValidateWithPath (path string )error {return nil };func NewCT_Schema ()*CT_Schema {_ca :=&CT_Schema {};return _ca };func (_gab *SchemaLibrary )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .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 ,_c .Attr {Name :_c .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 ,_c .Attr {Name :_c .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 _gab .CT_SchemaLibrary .MarshalXML (e ,start );};func init (){_e .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 );_e .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 );_e .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 );}; |