Discussion:
[Xmltv-devel] New DTD element : "keywords"
h***@gmail.com
2014-04-19 10:24:30 UTC
Permalink
I would like to add the code to add "keywords" from the IMDb into xml files, using the patch supplied in Patch #14 ( https://sourceforge.net/p/xmltv/patches/14/ ).

This requires the addition of a new DTD element "<keywords>" adding to <programme>.

As currently written I think this would be like:

<programme>
<title>...
<keywords>a,b,c</keywords>
...

Comments?

I think it should also allow 'with-lang' to facilitate a more general use of this tag.

Geoff
Robert Eden
2014-04-19 20:20:40 UTC
Permalink
Post by h***@gmail.com
I would like to add the code to add "keywords" from the IMDb into xml files, using the patch supplied in Patch #14 ( https://sourceforge.net/p/xmltv/patches/14/ ).
This requires the addition of a new DTD element "<keywords>" adding to <programme>.
<programme>
<title>...
<keywords>a,b,c</keywords>
...
Comments?
I think it should also allow 'with-lang' to facilitate a more general use of this tag.
Geoff
Doesn't sound like a bad idea.. would plot-keywords be better?

Does any other source provide something similar?

Isn't "with-lang" only used for things to be displayed? Like
descriptions and titles?

Robert
Nick Morrott
2014-04-22 06:28:34 UTC
Permalink
Post by Robert Eden
Post by h***@gmail.com
I would like to add the code to add "keywords" from the IMDb into xml files, using the patch supplied in Patch #14 ( https://sourceforge.net/p/xmltv/patches/14/ ).
This requires the addition of a new DTD element "<keywords>" adding to <programme>.
<programme>
<title>...
<keywords>a,b,c</keywords>
...
Comments?
I wonder if each different keyword should be in its own <keyword>
element, rather than having them all as CSV in a single <keywords>
element?
Post by Robert Eden
Post by h***@gmail.com
I think it should also allow 'with-lang' to facilitate a more general use of this tag.
Agreed.
Post by Robert Eden
Doesn't sound like a bad idea.. would plot-keywords be better?
I like the proposed <keyword> to keep it short. The DTD would make it
clear what it means
Post by Robert Eden
Does any other source provide something similar?
I've seen other listings providers that provide keyword data, and I
think it'd be a valuable addition.
Post by Robert Eden
Isn't "with-lang" only used for things to be displayed? Like
descriptions and titles?
My understanding is that it's aimed at any textual element where
knowing the language of the element's value would be of use to the
consuming application for processing/display purposes.

Cheers,
Nick
h***@gmail.com
2014-04-22 08:12:29 UTC
Permalink
Post by Robert Eden
Does any other source provide something similar?
I've seen other listings providers that provide keyword data, [...]
Yes, I've seen this on the schedules on some newspaper's websites.
Post by Robert Eden
Isn't "with-lang" only used for things to be displayed? Like
descriptions and titles?
My understanding is that it's aimed at any textual element where
knowing the language of the element's value would be of use to the
consuming application for processing/display purposes.
If the keywords were just for searching then yes "with-lang" doesn't really fit, but if the application wants to actually display the keywords then I think "with-lang" becomes relevant.

I suppose the question is: would you ever get multiple sets of keywords in different languages?
(although the lang attribute should be optional; so perhaps it doesn't matter)
I wonder if each different keyword should be in its own <keyword>
element, rather than having them all as CSV in a single <keywords>
element?
So there are 3 alternatives:

1.
<keywords>a,b,c</keywords>

2.
<keyword>a</keyword>
<keyword>b</keyword>
<keyword>c</keyword>

3.
<keywords>
<keyword>a</keyword>
<keyword>b</keyword>
<keyword>c</keyword>
</keywords>


I personally prefer (3) - I think it better reflects the structure of the data e.g. as per <credits><actor*></credits>. Hmm, but <category*> doesn't work that way... ok I changed my mind then, I think option (2) ! :-)

Cheers,
Geoff
Jan Schneider
2014-04-22 10:10:13 UTC
Permalink
Post by h***@gmail.com
Post by Robert Eden
Does any other source provide something similar?
I've seen other listings providers that provide keyword data, [...]
Yes, I've seen this on the schedules on some newspaper's websites.
Post by Robert Eden
Isn't "with-lang" only used for things to be displayed? Like
descriptions and titles?
My understanding is that it's aimed at any textual element where
knowing the language of the element's value would be of use to the
consuming application for processing/display purposes.
If the keywords were just for searching then yes "with-lang" doesn't
really fit, but if the application wants to actually display the
keywords then I think "with-lang" becomes relevant.
I suppose the question is: would you ever get multiple sets of
keywords in different languages?
(although the lang attribute should be optional; so perhaps it
doesn't matter)
I wonder if each different keyword should be in its own <keyword>
element, rather than having them all as CSV in a single <keywords>
element?
1.
<keywords>a,b,c</keywords>
2.
<keyword>a</keyword>
<keyword>b</keyword>
<keyword>c</keyword>
3.
<keywords>
<keyword>a</keyword>
<keyword>b</keyword>
<keyword>c</keyword>
</keywords>
I personally prefer (3) - I think it better reflects the structure
of the data e.g. as per <credits><actor*></credits>. Hmm, but
<category*> doesn't work that way... ok I changed my mind then, I
think option (2) ! :-)
+1 for option 2.
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
Continue reading on narkive:
Loading...