mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-25 13:48:53 +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 (_b "encoding/xml";_c "fmt";_a "github.com/unidoc/unioffice";);func NewSchemaLibrary ()*SchemaLibrary {_ggb :=&SchemaLibrary {};_ggb .CT_SchemaLibrary =*NewCT_SchemaLibrary ();return _ggb ;};func NewCT_Schema ()*CT_Schema {_d :=&CT_Schema {};return _d };
|
|
|
|
// Validate validates the CT_Schema and its children
|
|
func (_cb *CT_Schema )Validate ()error {return _cb .ValidateWithPath ("\u0043T\u005f\u0053\u0063\u0068\u0065\u006da");};
|
|
|
|
// Validate validates the SchemaLibrary and its children
|
|
func (_db *SchemaLibrary )Validate ()error {return _db .ValidateWithPath ("\u0053\u0063\u0068\u0065\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};func (_af *CT_Schema )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {for _ ,_gd :=range start .Attr {if _gd .Name .Local =="\u0075\u0072\u0069"{_ag ,_cf :=_gd .Value ,error (nil );if _cf !=nil {return _cf ;};_af .UriAttr =&_ag ;continue ;};if _gd .Name .Local =="\u006d\u0061n\u0069\u0066\u0065s\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"{_fc ,_gc :=_gd .Value ,error (nil );if _gc !=nil {return _gc ;};_af .ManifestLocationAttr =&_fc ;continue ;};if _gd .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"{_ef ,_dg :=_gd .Value ,error (nil );if _dg !=nil {return _dg ;};_af .SchemaLocationAttr =&_ef ;continue ;};if _gd .Name .Local =="\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"{_gg ,_cfa :=_gd .Value ,error (nil );if _cfa !=nil {return _cfa ;};_af .SchemaLanguageAttr =&_gg ;continue ;};};for {_dge ,_da :=d .Token ();if _da !=nil {return _c .Errorf ("p\u0061\u0072\u0073\u0069ng\u0020C\u0054\u005f\u0053\u0063\u0068e\u006d\u0061\u003a\u0020\u0025\u0073",_da );};if _fca ,_ac :=_dge .(_b .EndElement );_ac &&_fca .Name ==start .Name {break ;};};return nil ;};func NewCT_SchemaLibrary ()*CT_SchemaLibrary {_cab :=&CT_SchemaLibrary {};return _cab };func (_efa *CT_SchemaLibrary )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ge :for {_cdf ,_df :=d .Token ();if _df !=nil {return _df ;};switch _cff :=_cdf .(type ){case _b .StartElement :switch _cff .Name {case _b .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"}:_cbc :=NewCT_Schema ();if _cabb :=d .DecodeElement (_cbc ,&_cff );_cabb !=nil {return _cabb ;};_efa .Schema =append (_efa .Schema ,_cbc );default:_a .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",_cff .Name );if _bc :=d .Skip ();_bc !=nil {return _bc ;};};case _b .EndElement :break _ge ;case _b .CharData :};};return nil ;};type SchemaLibrary struct{CT_SchemaLibrary };func (_fbf *SchemaLibrary )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ,_b .Attr {Name :_b .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 ,_b .Attr {Name :_b .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 _fbf .CT_SchemaLibrary .MarshalXML (e ,start );};
|
|
|
|
// Validate validates the CT_SchemaLibrary and its children
|
|
func (_ea *CT_SchemaLibrary )Validate ()error {return _ea .ValidateWithPath ("\u0043\u0054_\u0053\u0063\u0068e\u006d\u0061\u004c\u0069\u0062\u0072\u0061\u0072\u0079");};
|
|
|
|
// ValidateWithPath validates the CT_Schema and its children, prefixing error messages with path
|
|
func (_ca *CT_Schema )ValidateWithPath (path string )error {return nil };
|
|
|
|
// ValidateWithPath validates the SchemaLibrary and its children, prefixing error messages with path
|
|
func (_ggf *SchemaLibrary )ValidateWithPath (path string )error {if _bb :=_ggf .CT_SchemaLibrary .ValidateWithPath (path );_bb !=nil {return _bb ;};return nil ;};
|
|
|
|
// ValidateWithPath validates the CT_SchemaLibrary and its children, prefixing error messages with path
|
|
func (_fb *CT_SchemaLibrary )ValidateWithPath (path string )error {for _ec ,_aff :=range _fb .Schema {if _aca :=_aff .ValidateWithPath (_c .Sprintf ("\u0025\u0073\u002f\u0053\u0063\u0068\u0065\u006d\u0061\u005b\u0025\u0064\u005d",path ,_ec ));_aca !=nil {return _aca ;};};return nil ;};func (_cabd *SchemaLibrary )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_cabd .CT_SchemaLibrary =*NewCT_SchemaLibrary ();_fba :for {_cfc ,_ee :=d .Token ();if _ee !=nil {return _ee ;};switch _gb :=_cfc .(type ){case _b .StartElement :switch _gb .Name {case _b .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"}:_eb :=NewCT_Schema ();if _cg :=d .DecodeElement (_eb ,&_gb );_cg !=nil {return _cg ;};_cabd .Schema =append (_cabd .Schema ,_eb );default:_a .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",_gb .Name );if _ga :=d .Skip ();_ga !=nil {return _ga ;};};case _b .EndElement :break _fba ;case _b .CharData :};};return nil ;};func (_g *CT_Schema )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {if _g .UriAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0075\u0072\u0069"},Value :_c .Sprintf ("\u0025\u0076",*_g .UriAttr )});};if _g .ManifestLocationAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u006dan\u0069\u0066\u0065\u0073\u0074\u004c\u006f\u0063\u0061\u0074\u0069\u006f\u006e"},Value :_c .Sprintf ("\u0025\u0076",*_g .ManifestLocationAttr )});};if _g .SchemaLocationAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u006f\u0063a\u0074\u0069\u006f\u006e"},Value :_c .Sprintf ("\u0025\u0076",*_g .SchemaLocationAttr )});};if _g .SchemaLanguageAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006d\u0061\u003a\u0073\u0063\u0068\u0065\u006d\u0061\u004c\u0061\u006eg\u0075\u0061\u0067\u0065"},Value :_c .Sprintf ("\u0025\u0076",*_g .SchemaLanguageAttr )});};e .EncodeToken (start );e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};type CT_SchemaLibrary struct{Schema []*CT_Schema ;};func (_dc *CT_SchemaLibrary )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );if _dc .Schema !=nil {_cd :=_b .StartElement {Name :_b .Name {Local :"\u006da\u003a\u0073\u0063\u0068\u0065\u006da"}};for _ ,_efe :=range _dc .Schema {e .EncodeElement (_efe ,_cd );};};e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};type CT_Schema struct{UriAttr *string ;ManifestLocationAttr *string ;SchemaLocationAttr *string ;SchemaLanguageAttr *string ;};func init (){_a .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 );_a .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 );_a .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 );}; |