NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 29 30 31 32 33 … 93 Next »
Skin2 DTD (for skin XML validation)

 
  • 0 Vote(s) - 0 Average
Skin2 DTD (for skin XML validation)
PartialGestalt
Offline

Junior Member

Posts: 6
Threads: 2
Joined: Aug 2008
#1
2008-08-29, 06:25 PM
Folks,

After spending a couple of hours debugging a CompositeImage not found problem (turns out I had 'borderwidth' instead of 'borderWidth' in one of the child elements), I put together a quick DTD to use for validating my Skin2 XML files, and thought I'd post it in case anyone else is interested.

I couldn't find anything about DTDs in the forums, so my apologies if there is a standard version out there somewhere. Also, I'm not entirely sure that I've got everything right as far as what is optional vs. required or if the element set is complete, so feel free to let me know if you try it and see something wrong.

Anyway, if you'd like to use this with your Skin2 skin XML, just drop the DTD file in your main skin2 directory and add a <!DOCTYPE> tag to the start of your XML. For example, a skin.xml file (based on JavaWiz's most excellent utilities and tutorials) might look like:

[INDENT]
<?xml version="1.0"?>
<!DOCTYPE settings SYSTEM "C:\Program Files\Devnz\GBPVR\Skin\Skin2.dtd">
<settings>
<!-- named colours -->
<NamedColors>
<NamedColor name="NormalTextBoxBorder" color="Gray"/>
</NamedColors>

<!-- text style -->
<TextStyles>
<TextStyle name="DateTimeTextStyle" color="LightGray" size="10" typeFace="Arial" style="Bold"/>
</TextStyles>

<!-- placements -->
<Placements>
<Placement name="SystemDateTime" loc="65.0,02.0" />
</Placements>

<!-- Composite Images -->
<CompositeImages>
<!-- =========================================================== -->
<!-- Label Images -->
<!-- =========================================================== -->
<CompositeImage name="SystemDateTimeImage" size="35.0,15.0">
<DrawText text="@date" loc="0,0" size="100.0,45.0" textStyle="DateTimeTextStyle" align="Right"/>
<DrawText text="@time" loc="0,20" size="100.0,45.0" textStyle="DateTimeTextStyle" align="Right"/>
</CompositeImage>

</CompositeImages>

</settings>

[/INDENT]

If you put the Skin2.dtd file somewhere else, be sure to update the reference at the start of your XML.

There are a lot of validation tools out there, but if you use the Visual C# Express (I use 2008, but I think it works in 2005, too) and add the XML file to your project, you get auto-validation when you edit the file.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Skin help (correct location?) SFX Group 4 3,830 2018-01-24, 07:42 AM
Last Post: pBS
  skin question pBS 2 3,304 2016-06-18, 07:03 PM
Last Post: pBS
  Skin - view further into the future, scale the guide Vitenka 5 3,228 2014-11-26, 07:28 PM
Last Post: Vitenka
  Skin element Details in NowNext Jaggy 2 1,772 2011-09-19, 11:50 PM
Last Post: Jaggy
  Skin Help with Line Drawing Northpole 2 1,880 2011-07-19, 05:14 PM
Last Post: Northpole
  Anyone interested in developing a Skin Plugin? Hairy 13 4,923 2011-07-10, 04:13 PM
Last Post: mvallevand
  Skin help needed for EventDetails.xml bgowland 7 3,249 2011-06-26, 11:55 PM
Last Post: Jaggy
  Skin question - how to centre a list UiList control on screen? McBainUK 2 1,811 2011-02-17, 08:46 AM
Last Post: McBainUK
  List of Skin Elements ACTCMS 7 3,084 2010-12-22, 12:06 AM
Last Post: ACTCMS
  Supress Date display in NPVR skin Northpole 13 4,057 2010-10-02, 08:19 PM
Last Post: Northpole

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode