XML schema for XBMC XML files
#1
Inspired by the python stub library submitted by Roman, I did a little research on XML and found out that by associating an xml file to an xml-schema file (xsd), your editor becomes aware of the XBMC 'vocabulary' used in the skin files, and offers auto-completion by typing only one or two characters of a tag. It also can help advise you when you break other rules, such as having more or less than exactly one <window> and <controls> element. The autocompletion alone is handy even if all you use it for is to reduce spelling mistakes.

This is my first try at a working schema file. It's not perfect by any means, but is a good first step. Even in it's incomplete state, I've found it extremely useful editing files in my IDE of choice, PyCharm by JetBrains. Here's a screenshot, and a link to the file on pastebin. I'm furiously working on my own projects right now and currently it's 'good enough' for me, although it could certainly be improved by a lot. Feel free to improve it if you are so inclined.

Use:
1) Put this line into the top of all your skin files:
<!DOCTYPE window PUBLIC "http://www.w3.org/2001/XMLSchema" "http://xbmc.org/xbmc.xsd">

2) Save the pastebin file as xbmc.xsd.
http://pastebin.com/czSRQNPE

3) Associate the schema document with the URI for "http://xbmc.org/xbmc.xsd" in your editor - usually by 'installing' it somehow and then locating the file on disk for the editor.

4) Huh??

5) Profit

-jerimiah797

Image
Reply
#2
Nice work Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Nice work and initiative. This got me spending some time on your schema as well.
  • changed the original sequence to a group to allow for unordered elements.
  • Added more restrictions on animation and aspectratio element, this gives intellisense even for the values

http://sdrv.ms/19q9Ujj

This is clearly a work in progress and needs much more to be complete
Reply
#4
That's great! I was struggling with how to add the type values for control elements and such. Thank you so much for making it better! I was also trying to figure out how to add all of the built-in functions to this so they could be easily chosen when an <onload>, <onunload>, <onfocus>, <onclick> , etc. is used. I've got the list all typed out if you can figure out how to add that. I'm a total newb when it comes to xml schema.

Code:
<onload>Help</onload>
<onload>Reboot</onload>
<onload>ShutDown</onload>
<onload>Powerdown</onload>
<onload>Quit</onload>
<onload>Hibernate</onload>
<onload>Suspend</onload>
<onload>InhibitIdleShutdown(true/false)</onload>
<onload>AllowIdleShutdown</onload>
<onload>ActivateScreensaver</onload>
<onload>RestartApp</onload>
<onload>Minimize</onload>
<onload>Reset</onload>
<onload>Mastermode</onload>
<onload>SetGUILanguage</onload>
<onload>ActivateWindow(window[,dir,return])</onload>
<onload>ActivateWindowAndFocus(id1, id2,item1, id3,item2)</onload>
<onload>ReplaceWindowAndFocus(id1, id2,item1, id3,item2)</onload>
<onload>ReplaceWindow(window,dir)</onload>
<onload>TakeScreenshot</onload>
<onload>RunScript(script[,args]*)</onload>
<onload>StopScript(id)</onload>
<onload>RunAppleScript(script[,args]*)</onload>
<onload>RunPlugin(plugin)</onload>
<onload>RunAddon(id)</onload>
<onload>Extract</onload>
<onload>PlayMedia(media[,isdir][,1],[playoffset=xx])</onload>
<onload>SlideShow(dir [,recursive, [not]random])</onload>
<onload>RecursiveSlideShow(dir)</onload>
<onload>ReloadSkin()</onload>
<onload>UnloadSkin()</onload>
<onload>PlayerControl(Play)</onload>
<onload>PlayerControl(Stop)</onload>
<onload>PlayerControl(Forward)</onload>
<onload>PlayerControl(Rewind)</onload>
<onload>PlayerControl(Next)</onload>
<onload>PlayerControl(Previous)</onload>
<onload>PlayerControl(BigSkipForward)</onload>
<onload>PlayerControl(BigSkipBackward)</onload>
<onload>PlayerControl(SmallSkipForward)</onload>
<onload>PlayerControl(SmallSkipBackward)</onload>
<onload>PlayerControl(Random)</onload>
<onload>PlayerControl(RandomOn)</onload>
<onload>PlayerControl(RandomOff)</onload>
<onload>PlayerControl(Repeat)</onload>
<onload>PlayerControl(RepeatOne)</onload>
<onload>PlayerControl(RepeatAll)</onload>
<onload>PlayerControl(RepeatOff)</onload>
<onload>PlayerControl(Partymode(music))</onload>
<onload>PlayerControl(Partymode(video))</onload>
<onload>PlayerControl(Partymode(path to .xsp))</onload>
<onload>PlayerControl(Record)</onload>
<onload>Playlist.PlayOffset</onload>
<onload>Playlist.Clear</onload>
<onload>EjectTray()</onload>
<onload>AlarmClock(name,command,time[,silent,loop])</onload>
<onload>CancelAlarm(name[,silent])</onload>
<onload>Action</onload>
<onload>Notification(header,message[,time,image])</onload>
<onload>PlayDVD</onload>
<onload>RipCD</onload>
<onload>Skin.ToggleSetting(setting)</onload>
<onload>Skin.SetString(string[,value])</onload>
<onload>Skin.SetNumeric(numeric[,value])</onload>
<onload>Skin.SetPath(string[,value])</onload>
<onload>Skin.Theme</onload>
<onload>Skin.SetImage(string[,value])</onload>
<onload>Skin.SetLargeImage(string[,value])</onload>
<onload>Skin.SetFile(string,mask,folderpath)</onload>
<onload>Skin.SetAddon(string,type)</onload>
<onload>Skin.SetBool(setting)</onload>
<onload>Skin.Reset(setting)</onload>
<onload>Skin.ResetSettings</onload>
<onload>Mute</onload>
<onload>SetVolume(percent[,showvolumebar])</onload>
<onload>Dialog.Close(dialog[,force])</onload>
<onload>System.LogOff</onload>
<onload>System.Exec</onload>
<onload>System.ExecWait</onload>
<onload>Resolution</onload>
<onload>SetFocus(id,position</onload>
<onload>UpdateLibrary(database,[path])</onload>
<onload>CleanLibrary(database)</onload>
<onload>exportlibrary(music,false,filepath)</onload>
<onload>exportlibrary(video,true,thumbs,overwrite,actorthumbs)</onload>
<onload>PageDown</onload>
<onload>PageUp</onload>
<onload>Container.Refresh</onload>
<onload>Container.Update</onload>
<onload>Container.NextViewMode</onload>
<onload>Container.PreviousViewMode</onload>
<onload>Container.SetViewMode(id)</onload>
<onload>Container.NextSortMethod</onload>
<onload>Container.PreviousSortMethod</onload>
<onload>Container.SetSortMethod</onload>
<onload>Container.SortDirection</onload>
<onload>Control.Move(id,offset)</onload>
<onload>Control.SetFocus(id,position</onload>
<onload>Control.Message(id,message,[windowid])</onload>
<onload>SendClick(windowid,id)</onload>
<onload>LoadProfile(profilename,[prompt])</onload>
<onload>SetProperty(key,value[,id])</onload>
<onload>ClearProperty(key[,id])</onload>
<onload>PlayWith()</onload>
<onload>WakeOnLan(mac_address)</onload>
<onload>Addon.Default.OpenSettings</onload>
<onload>Addon.Default.Set</onload>
<onload>Addon.OpenSettings(id)</onload>
<onload>UpdateAddonRepos</onload>
<onload>UpdateLocalAddons</onload>
<onload>ToggleDPMS</onload>
<onload>CECToggleState</onload>
<onload>CECActivateSource</onload>
<onload>CECStandby</onload>
<onload>Weather.Refresh</onload>
<onload>Weather.LocationNext</onload>
<onload>Weather.LocationPrevious</onload>
<onload>Weather.LocationSet</onload>
<onload>LIRC.Stop</onload>
<onload>LIRC.Start</onload>
<onload>LIRC.Send(command)</onload>
<onload>VideoLibrary.Search</onload>
<onload>ToggleDebug</onload>
<onload>StartPVRManager</onload>
<onload>StopPVRManager</onload>
<onload>StartAndroidActivity(package,[intent,dataType,dataURI])</onload>
Reply
#5
Actually when I built the original version of the schema, I had no idea how to write one from scratch, so I just had my editor autogenerate it from a giant xml file that contained all the controls and such. I went through the wiki and identified each tag that applied to each control - since they each have their own subset of special tags in addition to the standard ones like <posx>, <width>, etc. I'll put that up here, too, in case it's useful.

Code:
<controls>
        <control type="group" id="5">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <defaultcontrol></defaultcontrol>
        </control>
        <control type="grouplist" id="17">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <itemgap></itemgap>
            <orientation></orientation>
            <pagecontrol></pagecontrol>
            <scrolltime></scrolltime>
            <usecontrolcoords></usecontrolcoords>
        </control>
        <control type="label" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <align></align>
            <aligny></aligny>
            <scroll></scroll>
            <label></label>
            <info></info>
            <number></number>
            <angle></angle>
            <haspath></haspath>
            <font></font>
            <textcolor></textcolor>
            <shadowcolor></shadowcolor>
            <wrapmultiline></wrapmultiline>
            <scrollspeed></scrollspeed>
            <scrollsuffix></scrollsuffix>
        </control>
        <control type="fadelabel" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <label></label>
            <info></info>
            <font></font>
            <textcolor></textcolor>
            <textoffsetx></textoffsetx>
            <shadowcolor></shadowcolor>
            <angle></angle>
            <scrollout></scrollout>
            <pauseatend></pauseatend>
            <resetonlabelchange></resetonlabelchange>
            <scrollspeed></scrollspeed>
        </control>
        <control type="image" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <aspectratio>keep</aspectratio>
            <texture border="5" flipy="true" flipx="false">.png</texture>
            <bordertexture border="5"></bordertexture>
            <bordersize></bordersize>
            <info></info>
            <fadetime></fadetime>
        </control>
        <control type="largeimage" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <aspectratio></aspectratio>
            <texture></texture>
            <info></info>
        </control>
        <control type="multiimage" id="3">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <imagepath></imagepath>
            <info></info>
            <timeperimage></timeperimage>
            <fadetime></fadetime>
            <pauseatend></pauseatend>
            <loop></loop>
            <aspectratio></aspectratio>
        </control>
        <control type="button" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <focusedcolor></focusedcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <angle></angle>
            <align></align>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
            <textwidth></textwidth>
            <onclick></onclick>
            <onfocus></onfocus>
            <onunfocus></onunfocus>
        </control>
        <control type="radiobutton" id="2">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <textureradioon></textureradioon>
            <textureradiooff></textureradiooff>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <focusedcolor></focusedcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <align></align>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
            <selected></selected>
            <onclick></onclick>
            <radioposx></radioposx>
            <radioposy></radioposy>
            <radiowidth></radiowidth>
            <radioheight></radioheight>
            <onfocus></onfocus>
            <onunfocus></onunfocus>
        </control>
        <control type="selectbutton" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <texturebg></texturebg>
            <textureleft></textureleft>
            <textureleftfocus></textureleftfocus>
            <textureright></textureright>
            <texturerightfocus></texturerightfocus>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <align></align>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
        </control>
        <control type="togglebutton" id="5">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <alttexturefocus></alttexturefocus>
            <alttexturenofocus></alttexturenofocus>
            <usealttexture></usealttexture>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <align></align>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
            <onclick></onclick>
            <onfocus></onfocus>
            <onunfocus></onunfocus>
        </control>
        <control type="multiselect" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <focusedcolor></focusedcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
        </control>
        <control type="spincontrol" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <textureup></textureup>
            <textureupfocus></textureupfocus>
            <texturedown></texturedown>
            <texturedownfocus></texturedownfocus>
            <font></font>
            <textcolor></textcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <subtype></subtype>
            <align></align>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
        </control>
        <control type="spincontrolex" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <textureup></textureup>
            <textureupfocus></textureupfocus>
            <texturedown></texturedown>
            <texturedownfocus></texturedownfocus>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <align></align>
            <aligny></aligny>
            <textoffsetx></textoffsetx>
            <textoffsety></textoffsety>
        </control>
        <control type="slider" id="16">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturesliderbar></texturesliderbar>
            <textureslidernib></textureslidernib>
            <textureslidernibfocus></textureslidernibfocus>
            <controloffsetx></controloffsetx>
            <controloffsety></controloffsety>
            <info></info>
            <action></action>
        </control>
        <control type="scrollbar" id="17">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <texturesliderbackground></texturesliderbackground>
            <texturesliderbar></texturesliderbar>
            <texturesliderbarfocus></texturesliderbarfocus>
            <texturesliderbarnib></texturesliderbarnib>
            <texturesliderbarnibfocus></texturesliderbarnibfocus>
            <orientation></orientation>
            <showonepage></showonepage>
        </control>
        <control type="sliderex" id="2">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <sliderwidth></sliderwidth>
            <sliderheight></sliderheight>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
            <texturebg></texturebg>
            <textureslidernib></textureslidernib>
            <textureslidernibfocus></textureslidernibfocus>
            <label></label>
            <font></font>
            <textcolor></textcolor>
            <disabledcolor></disabledcolor>
            <shadowcolor></shadowcolor>
            <textoffsetx></textoffsetx>
            <info></info>
        </control>
        <control type="progress" id="2">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <reveal></reveal>
            <texturebg></texturebg>
            <lefttexture></lefttexture>
            <righttexture></righttexture>
            <overlaytexture></overlaytexture>
            <info></info>
        </control>
        <control type="list" id="50">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <viewtype></viewtype>
            <orientation></orientation>
            <pagecontrol></pagecontrol>
            <scrolltime></scrolltime>
            <itemlayout></itemlayout>
            <focusedlayout></focusedlayout>
            <content></content>
            <preloaditems></preloaditems>
        </control>
        <control type="wraplist" id="50">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <viewtype></viewtype>
            <orientation></orientation>
            <pagecontrol></pagecontrol>
            <scrolltime></scrolltime>
            <focusposition></focusposition>
            <itemlayout></itemlayout>
            <focusedlayout></focusedlayout>
            <content></content>
        </control>
        <control type="fixedlist" id="50">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <viewtype></viewtype>
            <orientation></orientation>
            <pagecontrol></pagecontrol>
            <scrolltime></scrolltime>
            <focusposition></focusposition>
            <itemlayout></itemlayout>
            <focusedlayout></focusedlayout>
            <content></content>
            <preloaditems></preloaditems>
        </control>
        <control type="panel" id="50">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <onup></onup>
            <ondown></ondown>
            <onleft></onleft>
            <onright></onright>
            <hitrect></hitrect>
            <pulseonselect></pulseonselect>
            <viewtype></viewtype>
            <orientation></orientation>
            <pagecontrol></pagecontrol>
            <scrolltime></scrolltime>
            <itemlayout></itemlayout>
            <focusedlayout></focusedlayout>
            <content></content>
            <preloaditems></preloaditems>
        </control>
        <control type="textbox" id="2">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <font></font>
            <textcolor></textcolor>
            <shadowcolor></shadowcolor>
            <pagecontrol></pagecontrol>
            <autoscroll></autoscroll>
        </control>
        <control type="rss" id="1">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <id></id>
            <font></font>
            <textcolor></textcolor>
            <shadowcolor></shadowcolor>
            <highlightcolor></highlightcolor>
            <titlecolor></titlecolor>
            <scrollspeed></scrollspeed>
        </control>
        <control type="visualisation" id="3">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
        </control>
        <control type="videowindow" id="3">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
        </control>
        <control type="mover" id="2">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
        </control>
        <control type="resize" id="3">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <texturefocus></texturefocus>
            <texturenofocus></texturenofocus>
        </control>
        <control type="editcontrol" id="4">
            <description></description>
            <type></type>
            <id></id>
            <posx></posx>
            <posy></posy>
            <width></width>
            <height></height>
            <visible></visible>
            <animation></animation>
            <camera></camera>
            <colordiffuse></colordiffuse>
            <aligny></aligny>
            <label></label>
            <hinttext></hinttext>
            <font></font>
            <textcolor></textcolor>
            <onclick></onclick>
        </control>
    </controls>
Reply
#6
I don't think it's going to work very well to add in the functions available to on load/onunload. Since the functions take parameters it can't be done using the enumeration I've used so far, it would likely be a giant list of regexps that make editors cry. Also keep in mind that it could be random python as well and not just the built in functions.

My suggestion would be to add an annotation with a link to the wiki page listing the functions . This way you should get a tooltip pointing you to where the available functions are listed.

Auto generating the schema is the right place to start, it's fairly painful hand coding it and trying to remember the rules on what can be used where. Visual studio is a big help here(probably other good options as well) and this msdn documentation as it clearly states which elements can contain which.

With your permission Jeremiah I'd like to throw this on github, easier to keep track of than exchanging pastebins
Reply
#7
Yes, I see what you mean. What about putting the list itself as an annotation so the tooltip shows the builtins? I'm trying to pack as much info as I can into the schema file itself. I'd like to do the same thing for the booleans as well.

The githib idea is great. Go for it!
Reply
#8
ok i pushed this to https://github.com/Paxxi/xbmc-xsd/

not sure how it would work adding all of it as an annotation, will just have to try it and see how it looks i guess.

I agree about booleans, everything that is a fixed type or list should be correctly defined when done.
Reply
#9
heh, doesnt look that good Smile
Image
Reply

Logout Mark Read Team Forum Stats Members Help
XML schema for XBMC XML files1