Page 1 of 2
Att to Wilspo
Posted: 2002-11-14 22:07:04
by craZy C
Moved this to its own thread...( Again sorry Twink )
Wilspo, your template is great however i am having issues getting it to run correctly. I have the latest parser and beleive i have done every thing correctly.
I extract as html using your movie.xml template but it appears to only give me the basic page with errors.
Would you be able to give us a quick idiot proof walk through ????
PLEASE......
Posted: 2002-11-14 23:48:41
by Twink
I have the basic page with no errors. just the search box, and empty filter box, and no movies at all.
Posted: 2002-11-15 00:05:28
by Twink
after playing around with the xml for a while, I discovered having an ampersand ('&') in one of the fields (Actors in my case) stopped it from showing. I also noticed the template seems to have the picture field twice for some reason.
Guide to new template!
Posted: 2002-11-15 00:15:31
by Guest
Hello!
I've changed the template a little bit so you should not need to download any new parser.
Still the template is not finnished and the play function does not work yet.
I've only tried it in Internet Explorer 6 on PC (and I would be supprised if it works with anything else
)
Anyway this is how you should do:
- 1.Download http://www.tegenaria.com/moviedb/xslt_template_2.rar
2.Extract it to any folder you like (source directory)
3.Try to run index.html. That should bring up the template but with only one movie: $$formated_movie_title...
If this does not work you probably have to download a new xml parser from microsoft.
4.Now save the file data/movies.xml as something.html and place it in the same directory as your other Movie Catalog templates.
5.Start Movie Catalog
6.Export as html (full with images)
7.Choose something.html as your template and save the target as movies.xml in your source directory/data
8.Run index.html. This should bring up the templates with your movies
Troubleshooting:
If step 8 does not work but step 3 did then there is probably something wrong with movies.xml (invalid characters or unallowed white-space). Try to open your movies.xml in ie. Scroll down to check for errors. If you find any bad character error try putting this datafield inside a CDATA clause in the template
something.html (like i have done for some fields like desciption and actors)
Good luck!
/w
Hmm
Posted: 2002-11-15 00:21:53
by Willspo
That post was from me
'&' characters will mess up the template.
I think you can get around that by adding CDATA to the other datafields as well in the template.
I noticed that only description and title was
And also the picture is in there twice for absolutely no reason!
I'll fix these things soon. But now I have to sleep.
/w
Posted: 2002-11-15 02:02:11
by Twink
Adding CData around the actors field make it work perfectly (wouldn't work at all without it actually, even with no &'s in the thing, must have been another character this time).
I'm yet to understand why a movie with a rating of 0 has 5 full stars, is this a mistake?. Also if the Director field is null then it screws up the borders for that cell.
Posted: 2002-11-15 08:27:11
by antp
The HTML Export should replace the & < > characters actually... so that's a bug
There are maybe other forbidden characters.
I will correct that for a future version.
But for special characters such as é à è etc... you need to specify a charset in the XML header (like what Ant Movie Catalog does when saving to XML, but it does it wrongly since it does not allow you to modify it, and specifies European charset
)
ehh
Posted: 2002-11-15 09:26:35
by Willspo
Rating 0 = 5 stars, that's a misstake.
Guess I don't have any 0 star movies.
You simply need another image called 0.png in the image folder.
I'll fix that soon.
/w
Posted: 2002-11-18 11:27:48
by craZy C
Soz. for not replying sooner, That little cdata trick worked like a dream......
Posted: 2002-11-29 08:54:46
by Guest
sorry for not understanding in details, but what's cdata? where and how can i add what? im having trouble with character stuff.
thanks
Posted: 2002-11-29 09:52:33
by Guest
antp wrote:The HTML Export should replace the & < > characters actually... so that's a bug
There are maybe other forbidden characters.
I will correct that for a future version.
But for special characters such as é à è etc... you need to specify a charset in the XML header (like what Ant Movie Catalog does when saving to XML, but it does it wrongly since it does not allow you to modify it, and specifies European charset
)
How do you actually specify different character set? You mean in here?
<?xml version="1.0" encoding="ISO-8859-1" ?> What about Korean character? What do I and how do I put that information in?
Below is what I have for now which still wouldn't work. Let me know what else needs to be changed.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<movies>
$$ITEM_BEGIN
<movie>
<number>$$ITEM_NUMBER</number>
<date>$$ITEM_DATEADD</date>
<media>$$ITEM_MEDIA</media>
<title><![CDATA[$$ITEM_FORMATTEDTITLE2]]></title>
<year>$$ITEM_YEAR</year>
<length>$$ITEM_LENGTH</length>
<category>$$ITEM_CATEGORY</category>
<director>$$ITEM_DIRECTOR</director>
<description><![CDATA[$$ITEM_DESCRIPTION]]></description>
<picture>$$ITEM_PICTUREFILENAME</picture>
<producer>$$ITEM_PRODUCER</producer>
<picture>$$ITEM_PICTUREFILENAME</picture>
<actors><![CDATA[$$ITEM_ACTORS]]></actors>
<rating>$$ITEM_RATING</rating>
</movie>
Posted: 2002-11-29 10:05:42
by azpirin
ok ok Finally, got it to work. however, I am having a trouble displaying correct character for Korean font. Any suggestion? Do I need to set that up in here <?xml version="1.0" encoding="ISO-8859-1" ?>? If so, how?
Thank you,
Posted: 2002-11-29 10:43:24
by Guest
azpirin wrote:ok ok Finally, got it to work. however, I am having a trouble displaying correct character for Korean font. Any suggestion? Do I need to set that up in here <?xml version="1.0" encoding="ISO-8859-1" ?>? If so, how?
Thank you,
Well, after playing around, when I change encoding = "iso-2022-kr" or encoding = "ks_c_5601-1987", it displays fine plus no error in movies.xml. However, when I run index.html, nothing appears. just blank. hm... so i switch back to encoding = "ISO-8859-1", index.html comes back fine but broken character for korean font.
whew~~~ need a major help here.
Posted: 2002-11-29 11:43:22
by antp
Maybe that you must change the encoding in index.html too
Posted: 2002-11-29 19:34:52
by Guest
yes, yes, i have added a encoding = "ks_c_5601-1987" where <? xml version..... > are in index.html, and it works great!!!
wow, finally. Thank you.
Posted: 2002-12-10 01:26:37
by jan_hut
how would this work with an apache webserver? what extra's would need to be installed?
Posted: 2002-12-10 04:21:13
by Willspo
This is all client side. So it can run anywhere on any server. The requirements are on the viewers (clients) computer (Internet Explorer > 5.5 & PC). If you would like to change it into a server side sollution i guess that you can use the xsl transforms. The only thing you have to change is the javascript in index.html to some kind of server side script. All the calls to showCategory(...) etc have to be changed to post to the server (reload the page). I think you can reuse more of the code if you run a microsoft server.
Good luck!
/w
Posted: 2002-12-10 19:18:16
by Guest
Hi Willspo,
I also use your great template. It's nearly perfect. But I've to customize for my needs. Now my problem:
I wan't to add a new Box:
Code: Select all
[b]transform.html[/b]
<div class="box">
<div class="boxHeader">
Graupelistiken
</div>
<div class="boxContent">
<xsl:apply-templates select="movies" mode="graupelistiken" />
<i>Funzt net :( </i>
</div>
</div>
In this Box I wan't to call some values of "moviesXML"-tags:
Code: Select all
[b]transform.html[/b]
<xsl:template match="movies" mode="graupelistiken">
showGraupelistiken(1)
Filme: ;<xsl:value-of select="filmegesamt1" />
<br class="graupelistiken" />
</xsl:template>
in my/your
index.html I've added:
Code: Select all
[b]index.html[/b]
function showGraupelistiken(number)
{
var main = document.all.main;
}
I think because of my defective Code, u already know my mistakes I've made. If not: This Code doesn't function. The Box is rendered. But the content shows only the String "showGraupelistiken(1) gesamt:;" It shows not the value on which I wan't to point. I hope u can understand me and my english, if not please ask
oh and thx for ur template
Posted: 2002-12-11 01:04:26
by Willspo
I am not sure I understand what you are trying to do. Have you modified movies.xml to include a node called <filmegesamt1>? and you want to display the content of that node in a box?
If so the first part of your code looks ok. The second part of the code is a bit strange but should output "showGraupelistiken(1) Filme: ;
value of node filmegesamt1" inside the box. Is this waht you want? The reason why the value does not show is because the parser can't find the node filmegesamt1 as a child to node movies or it's empty.
If you want the content of filmegesamt1 as a link that calls your javascript function you have to write something like this:
Code: Select all
<a href="javasript:showGraupelistiken(1)">
Filme: ;<xsl:value-of select="filmegesamt1" />
</a>
The third part of your code (javascript function) does'nt do anything. What do you want it to do?
If you could explain a little more in detail what your trying to accomplish maybe I can give you some better advise. Post a part of your modified movies.xml file. Maybe filmegesamt is just at the wrong level in the xml?
/w
Posted: 2002-12-11 08:48:02
by Guest
Yes I want to display the content of <filmegesamt1>. For the moment thats all. My Output should be: ""Filme: " content of filmegesamt1".
I can't understand what I need, and what not.
In: <a href="javasript:showGraupelistiken(1)"> I call a javascript function. But do I need this, if I only want to display a value?
The third part says that lack of understanding. Do I need need a javascript funktion, if I dont want to open or hide something?
Now I'm on work. So I can't post a part of the movies.xml. But this file is not so much modified. I've pasted only <filmegesamt1>769</filmegesamt1> Thats all. This line exists in the same level like <year>2002</year>.
Yes, certainly I know it's hard for you because of my terrible english and my description. But with every post my description would be better and better