Jump to content
Sign in to follow this  
ahuimanu

Extended GAUGE XML Schema

Recommended Posts

>>Thank-You :-)>>Regards,>Roman>Wow, this is just what I need! I have been learning from and experimenting with the baron gauges and using MS Visual Studio 2005 and the SDK XDR/DTD don't have all of the possible elements.I'll fire this up now and see how it runs.Thanks again!!!J-(P.S. this is probably sticky-worthy if you ask me)


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

Alex,One possible issue (and it may be limited to the tools I am using). With MS Visual Studio 2005's XML editor, you must transform any DTD or XDR to an XSD before it can be used for validation and IntelliSense (drop downs and autocompletes) of an XML document. When either the FS2004 SDK dtd or xdr files are converted the following line is a problem: I can see the problem as the "Item" element is created twice. I also see the same problem occuring in your Extended XDR/DTD. This may be an issue with the tool I'm using or it may not be - I am just passing this along.When I correct this passage so that it reads thusly: The problem is no more.Thanks again for your effort,J-


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

Where on earth have You got those?A link for updates checks would be more than welcome :-zhelp

Share this post


Link to post
Share on other sites

Hi, I cannot get XMLspy to accept the xdr file when importing as a schema. Help please,cheers,nick

Share this post


Link to post
Share on other sites

>Where on earth have You got those?>A link for updates checks would be more than welcome :-zhelp>Hi adr,Not sure who you are addressing. I got my original dtd/xdr in the panels SDK under the /inc folder.J-


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

>Would you happen to have a sucessfully converted .XSD you>could share?>>I've tried converting the posted (and SDK) .XDRs with VS.NET's>XSD tool and keep running into errors i can't resolve.>>Thanks,>--JonI've just spent several hours with all this and here's what I've found (bear in mind, my tool is Visual Studio 2005's XML Editor):(1) Neither the Baron nor the 747 gauges really fully cooperate against the XDR/DTD-created XSD(2) I've made some progress in fixing typical errors, but but many lie within the original DTD/XDR.(3) There are many perfectly-working XML examples that do not validate at all against the extended or SDK DTD/XDR.So, I feel like I'm chasing my tail. However, I will work on this.While the original poster hasn't responded, I'm curious how he made his extended DTD/XDR. I am thinking he may have based it on the FS9 GPS gauge.So Jon, I really don't have anything that works 100%. Now, I can make new gauges that completely obey the stock DTD/XDR, but some tricks you learn here (such as placing text between the tags) which do not wash well with the SDK DTD/XDR.


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

Okay,More progress.First, at least in my editor (Visual Studio 2005, XML Editor), I have to do the following in order to use the provided DTD without having to convert it to an XML Schema (which seems to mess it up sometimes):(note: "Extended-Schemagauges.dtd" is a relative path in my own development environment)FS9 doesn't seem to care about the extra junk as it is only looking for what it's own DTD provides for. I can only guess that, in terms of the ACES/MSFS team circa 2002/2003, someone did the 747/Baron stuff and someone else did the GPS stuff. I suspect this as the DTD that came with the SDK doesn't address most of what the extended DTD/XDR provided in this post does. Most of what the extended DTD/XDR addresses is what is in the fs9gps.cab xml files. Things like doing the vector drawing and making function-like macros.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Order Matters!!Oddly, providing the content attributes of a tag in the correct order MATTERS at least for my own editor. So, for instance, nick's PANEL_RELOAD example wouldn't validate properly until I changed the order of the nested tags. For instance, the nested tag order for is:Help?, Tooltip?, Cursor?, Click?, MouseWheelUp?, MouseWheelDown?, Area*I suspect most of the default gauges are like this too. I am guessing that my editor has defaulted to a very strict mode for validation. However, what is GREAT is the auto-completion/Intellisense available for gauge programming.So far, I find that both the stock and extended (posted here) DTDs DO work. I find compiling the XDR to and XSD presents a touch more trouble - so I'm trying to stay with the DTD.J-


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

Hi Alex,I'll play with it today. I do have your DTD working great though. J-


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

J,Thanks for the help, but unfortunately still no joy here:((note: "Extended-Schemagauges.dtd" is a relativepath in my own development environment)-----------------------------VS is complaining that it can't find the path to the schema. When you say "Extended-Schemagauges.dtd" is a relative path, what's it relative to? i.e. If "gauges.dtd" is placed in the same directly as "mygauge.xml", shouldn't the relative path be "gauges.dtd"?And what is xmlns="http://tempuri.org/gauges"? Is that even necessary?Sorry to be such a bonehead, but I've never tried to use schemas for coding before, and I thought it might make things a tad faster if auto-complete is useful.Jon

Share this post


Link to post
Share on other sites

Hey Jon,In my case, "Extended-Schemagauges.dtd"was relative to the location of the XML file for the gauge. So, Alex's gauges.dtd is located in a subdirectory called Extended-Schema.In order to get VS2005 to do Intelli-sense/Auto-complete, it still wants to use XML Schema. So, xmnls="http://tempuri.org/gauges" is the namespace indicated in the gauges.dtd definition file.I suspect your problem is related to the location value you are placing after SYSTEM in the DOCTYPE tag.Did you try Alex's new XSD directly?J-


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

>Did you try Alex's new XSD directly?>I tried, but again I couldn't associate it with my XML doc(s). I tried creating a project and including the XML file, and the new XSD, then doing properties on the XML file. The associated drop-down list of schemas does not let you type in a path. /shrugWhy you don't just have some kind of "Use This Freaking Schema..." option, I'll never understand. Everything in VS has to be too convoluted to make it worth the effort.Thanks again for the help, but I'm probably going to give up on this one before I waste anymore time on it. Perhaps I can find a free trial of another editor that has that "Use This Freaking Schema..." option I was talking about:)--Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...