Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2008, 05:45 AM
carel carel is offline
Junior Member
 
Join Date: Jan 2008
Posts: 24
Downloads: 0
Uploads: 0
Default xml validation

I would like to use an xml editor for studying and editing Flashpanoramas xml, but every xml editor seems to choke on Flashpanoramas xml. It usually happens somewhere in a line with <spot.

I guess most people here just use a regular text editor, but I find the highly structured setup of a dedicated xml editor, such as xml notepad 2007 much easier to use.

Any suggestions...?

Carel Struycken
Reply With Quote
  #2  
Old 02-22-2008, 10:39 AM
fritsjan fritsjan is offline
Junior Member
 
Join Date: Apr 2007
Posts: 26
Downloads: 2
Uploads: 0
Default

I noticed that too, also when you try to view an fpp xml in IEbrowser, it hangs. My guess is that it has to do with the '.' in a <spot declaration.

for example the dot in 3.00:

<spot id="hidemapTab" url="tour-map/hidemap.png" static="1" salign="LT" align="LT"
staticX="3.00" staticY="20.00" depth="10" visible="0" alpha="0"
onClick="mapback.Close;"
/>

I am just guessing, am I right?
Reply With Quote
  #3  
Old 02-22-2008, 01:22 PM
Aifos's Avatar
Aifos Aifos is offline
Senior Member
 
Join Date: Aug 2007
Location: Rosario - Argentina
Posts: 248
Downloads: 0
Uploads: 0
Default

i use Dreamweaver
it separates your parameters in colours.
<spot id="1" url="files/1" static="1" depth="115"
onclick="action()"/>

if you have a missing " the parameter turn red so you know when you have anerror and it is easyer to fing it.
__________________
aifos
Ciudad Esférica
Follow me on Twitter
Reply With Quote
  #4  
Old 02-22-2008, 02:44 PM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: Berkeley, California, USA
Posts: 774
Downloads: 0
Uploads: 0
Send a message via AIM to cheathamlane
Default

I would imagine that it would choke on the semicolon rather than a period.

I've found that when I use an FPP-supplied example XML file as a base for my own, that I get the error(s). When I start from scratch, no errors.

It may be an issue with the encoding of the file -- Starting from scratch, I always work in a page encoded utf-8, so can handle most any character w/o issue.
Code:
<?xml version='1.0' encoding="utf-8"?>
Editor of choice: BBEdit!

The latest rev allows you to show/hide blocks of code on the fly, which is something I've been wanting for a while.
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
Reply With Quote
  #5  
Old 02-24-2008, 05:51 PM
zleifr's Avatar
zleifr zleifr is offline
Senior Member
 
Join Date: May 2007
Posts: 609
Downloads: 0
Uploads: 0
Default

I second Patrick on BBEdit. It is super chingon. Also, one reason that various XML editors may not be super happy with FPP XML is that I don't believe multi-line attributes are legal, ie:
onclick="
spot.property=value;
spot.property=value;
"
__________________
Zephyr Renner - AdvancedVirtualTours.com - zleifr @t yahoo

Improving the panoramic one mighty fine plug-in at a time: http://www.flashpanos.com
Reply With Quote
  #6  
Old 02-24-2008, 06:02 PM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: Berkeley, California, USA
Posts: 774
Downloads: 0
Uploads: 0
Send a message via AIM to cheathamlane
Default

Quote:
Originally Posted by zleifr View Post
Also, one reason that various XML editors may not be super happy with FPP XML is that I don't believe multi-line attributes are legal, ie:
onclick="
spot.property=value;
spot.property=value;
"
Good point Z! I had missed that.
__________________
Patrick
http://cheathamlane.net
--
Tutorials: Embed Pano 101, Pano auto-presentation
Reply With Quote
  #7  
Old 02-24-2008, 06:48 PM
carel carel is offline
Junior Member
 
Join Date: Jan 2008
Posts: 24
Downloads: 0
Uploads: 0
Default

Here is another reason why Flashpanoramas xml will not validate:
(?panoName=images/pano2&pan=100)" />

It is because in xml "&[word]" is used for an "entity refference".
"&" and "<" are reserved characters in xml and xml expects a closing character of ";". So when it encounters "=" instead, it invalidates the file as xml.

Here is a quote on the subject from www.w3schools.com

//quote
There are 5 predefined entity references in XML:
&lt; < less than
&gt; > greater than
&amp; & ampersand
&apos; ' apostrophe
&quot; " quotation mark

Note: Only the characters "<" and "&" are strictly illegal in XML. The greater than character is legal, but it is a good habit to replace it.
//endquote

What a bummer! XML editors make it sooo much easier for semi-dyslexics like me.

Carel
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:59 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.