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 (_d "encoding/xml";_ff "fmt";_c "github.com/unidoc/unioffice";);func (_e *CT_Schema )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {if _e .UriAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_ff .Sprintf ("\u0025\u0076",*_e .UriAttr )});};if _e .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_ff .Sprintf ("\u0025\u0076",*_e .ManifestLocationAttr )});};if _e .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_ff .Sprintf ("\u0025\u0076",*_e .SchemaLocationAttr )});};if _e .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_d .Attr {Name :_d .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_ff .Sprintf ("\u0025\u0076",*_e .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_bec *CT_SchemaLibrary )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );if _bec .Schema !=nil {_cag :=_d .StartElement {Name :_d .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_cbc :=range _bec .Schema {e .EncodeElement (_cbc ,_cag );};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};func (_eb *SchemaLibrary )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_eb .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_ebc :for {_gfa ,_de :=d .Token ();if _de !=nil {return _de ;};switch _cbb :=_gfa .(type ){case _d .StartElement :switch _cbb .Name {case _d .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 _bg :=d .DecodeElement (_dg ,&_cbb );_bg !=nil {return _bg ;};_eb .Schema =append (_eb .Schema ,_dg );default:_c .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",_cbb .Name );if _cga :=d .Skip ();_cga !=nil {return _cga ;};};case _d .EndElement :break _ebc ;case _d .CharData :};};return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
|
|
func (_ggb *CT_SchemaLibrary )ValidateWithPath (path string )error {for _ac ,_gga :=range _ggb .Schema {if _adb :=_gga .ValidateWithPath (_ff .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_ac ));_adb !=nil {return _adb ;};};return nil ;};
|
|
|
|
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
|
|
func (_cac *SchemaLibrary )ValidateWithPath (path string )error {if _cca :=_cac .CT_SchemaLibrary .ValidateWithPath (path );_cca !=nil {return _cca ;};return nil ;};func NewCT_Schema ()*CT_Schema {_b :=&CT_Schema {};return _b };func (_a *CT_Schema )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {for _ ,_ec :=range start .Attr {if _ec .Name .Local =="\u0075\u0072\u0069"{_ef ,_ba :=_ec .Value ,error (nil );if _ba !=nil {return _ba ;};_a .UriAttr =&_ef ;continue ;};if _ec .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_ea ,_fe :=_ec .Value ,error (nil );if _fe !=nil {return _fe ;};_a .ManifestLocationAttr =&_ea ;continue ;};if _ec .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_fa ,_cg :=_ec .Value ,error (nil );if _cg !=nil {return _cg ;};_a .SchemaLocationAttr =&_fa ;continue ;};if _ec .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_be ,_ad :=_ec .Value ,error (nil );if _ad !=nil {return _ad ;};_a .SchemaLanguageAttr =&_be ;continue ;};};for {_fee ,_ca :=d .Token ();if _ca !=nil {return _ff .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_ca );};if _cc ,_da :=_fee .(_d .EndElement );_da &&_cc .Name ==start .Name {break ;};};return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
|
|
func (_dd *CT_Schema )ValidateWithPath (path string )error {return nil };
|
|
|
|
// Validate validates the CT_SchemaLibrary and its children
|
|
func (_gec *CT_SchemaLibrary )Validate ()error {return _gec .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_fc *CT_SchemaLibrary )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_cd :for {_g ,_ae :=d .Token ();if _ae !=nil {return _ae ;};switch _gg :=_g .(type ){case _d .StartElement :switch _gg .Name {case _d .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"}:_fb :=NewCT_Schema ();if _ge :=d .DecodeElement (_fb ,&_gg );_ge !=nil {return _ge ;};_fc .Schema =append (_fc .Schema ,_fb );default:_c .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",_gg .Name );if _gf :=d .Skip ();_gf !=nil {return _gf ;};};case _d .EndElement :break _cd ;case _d .CharData :};};return nil ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_cb :=&CT_SchemaLibrary {};return _cb };func (_fag *SchemaLibrary )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ,_d .Attr {Name :_d .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 ,_d .Attr {Name :_d .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 _fag .CT_SchemaLibrary .MarshalXML (e ,start );};
|
|
|
|
// Validate validates the SchemaLibrary and its children
|
|
func (_aa *SchemaLibrary )Validate ()error {return _aa .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 ;};func NewSchemaLibrary ()*SchemaLibrary {_af :=&SchemaLibrary {};_af .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _af ;};
|
|
|
|
// Validate validates the CT_Schema and its children
|
|
func (_bc *CT_Schema )Validate ()error {return _bc .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};type SchemaLibrary struct{CT_SchemaLibrary };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 );}; |