Loading ...
Sorry, an error occurred while loading the content.
 

minimalistic media feed

Expand Messages
  • Vadim Zaliva
    Hi! I have simple feed in which each item is related to image posted by the user. I would now want to provide enclosures link at this point to avoid unecessry
    Message 1 of 14 , Sep 1 6:54 PM
      Hi!

      I have simple feed in which each item is related to image posted
      by the user. I would now want to provide enclosures link at this point
      to avoid unecessry downloads. Instead I woudl rather provide "player"
      url via media:RSS.

      Is my my understading of the spec is correct and following
      would be sufficient:

      1. Add media namespace definition to 'rss' element.

      2. Add empty 'media:content' element to each item (all attributes
      seems to be optional)

      3. Add 'media:player' element to each item with 'url' attribute for
      player.

      I understand that I could and should if possible provide more meta
      data in my feed, like content type, etc., but I would like to
      understand what are minimal additions and go from there.

      Somehow related question - what it takes to hint My Yahoo to show
      my feeds in "Media" layout when they added?

      Thanks!

      Vadim
    • David Hall
      ... I m interested in what you have planned. If you don t mind, post the feed here or email me directly at davidh@yahoo-inc.com ... Speaking strictly from the
      Message 2 of 14 , Sep 2 11:05 AM
        "Vadim Zaliva" <lord@...> wrote:
        >
        > Hi!
        >
        > I have simple feed in which each item is related to image posted
        > by the user. I would now want to provide enclosures link at this point
        > to avoid unecessry downloads. Instead I woudl rather provide "player"
        > url via media:RSS.

        I'm interested in what you have planned. If you don't mind, post the
        feed here or email me directly at davidh@...

        > Is my my understading of the spec is correct and following
        > would be sufficient:
        >
        > 1. Add media namespace definition to 'rss' element.
        >
        > 2. Add empty 'media:content' element to each item (all attributes
        > seems to be optional)

        Speaking strictly from the specification's standpoint, I guess you
        wouldn't even need media:content. Whether or not the various rendering
        engines would recognize what you are doing, I'm not exactly sure.

        > 3. Add 'media:player' element to each item with 'url' attribute for
        > player.
        >
        > I understand that I could and should if possible provide more meta
        > data in my feed, like content type, etc., but I would like to
        > understand what are minimal additions and go from there.
        >
        > Somehow related question - what it takes to hint My Yahoo to show
        > my feeds in "Media" layout when they added?

        I've been talking lately with the My Yahoo folks and we were
        discussing this. The way I see it, there are two types of media rich
        feeds. Ones devoted specifically towards media only (example:
        podcasting) and ones that are mixed-media (example: a blog with images
        attached). Because these feeds "function" differently, you'd probably
        want to render the two types differently.

        Apparently, it's a little difficult to accurately figure out which
        type a feed belongs to. One of the suggestions was to create some sort
        of hint, just as you describe. I'm not exactly sure how that might
        look in media rss, or if it's even something we should do. Thoughts?

        -David
      • nick gogerty
        We will soon be releasing a media RSS player that support music and videos inside of Outlook Express and Outlook. Anyone interested in participating in the
        Message 3 of 14 , Sep 3 9:18 PM
          We will soon be releasing a media RSS player that support music and videos inside of Outlook Express and Outlook.
           
          Anyone interested in participating in the Beta please contact me.
           
          In the meantime we publish some RSS tips about media at http://www.inclue.com/RSSGuidelines.pdf
           
          Our RSS player will support most media types, object embeds, enclosures and flash. 
           
          Media vendors can put a store inside the feed or full HTML.  Also you may be interested in how other media sites such as Google, and YouTube handle media, have a look at feed you can generate at www.feedgit.com
           
          best,
           

          Nick Gogerty

          CEO

          inclue! ...video RSS feed player

           
        • Vadim Zaliva
          ... I think this should not be part of feed data. It should be a parameter of the subscrition mechanism. When adding feed to My Yahoo I should be able to
          Message 4 of 14 , Sep 4 1:03 AM
            --- In rss-media@yahoogroups.com, "David Hall" <daviddhall@...> wrote:

            > I've been talking lately with the My Yahoo folks and we were
            > discussing this. The way I see it, there are two types of media rich
            > feeds. Ones devoted specifically towards media only (example:
            > podcasting) and ones that are mixed-media (example: a blog with images
            > attached). Because these feeds "function" differently, you'd probably
            > want to render the two types differently.
            >
            > Apparently, it's a little difficult to accurately figure out which
            > type a feed belongs to. One of the suggestions was to create some sort
            > of hint, just as you describe. I'm not exactly sure how that might
            > look in media rss, or if it's even something we should do. Thoughts?

            I think this should not be part of feed data. It should be a parameter
            of the subscrition mechanism. When adding feed to My Yahoo I should be
            able to specify "mode". This way it is left to discretion of the
            person putting "Add to My Yahoo" link.

            Vadim
          • Andris Jansons
            ... I think this should not be part of feed data. It should be a parameter of the subscrition mechanism. When adding feed to My Yahoo I should be able to
            Message 5 of 14 , Sep 18 12:11 PM
              Vadim Zaliva <lord@...> wrote:
              --- In rss-media@yahoogroups.com, "David Hall" wrote:

              > I've been talking lately with the My Yahoo folks and we were
              > discussing this. The way I see it, there are two types of media rich
              > feeds. Ones devoted specifically towards media only (example:
              > podcasting) and ones that are mixed-media (example: a blog with images
              > attached). Because these feeds "function" differently, you'd probably
              > want to render the two types differently.
              >
              > Apparently, it's a little difficult to accurately figure out which
              > type a feed belongs to. One of the suggestions was to create some sort
              > of hint, just as you describe. I'm not exactly sure how that might
              > look in media rss, or if it's even something we should do.
              Thoughts?

              I think this should not be part of feed data. It should be a parameter
              of the subscrition mechanism. When adding feed to My Yahoo I should be
              able to specify "mode". This way it is left to discretion of the
              person putting "Add to My Yahoo" link.

              Vadim








              Yahoo! Groups Links

              <*> To visit your group on the web, go to:
              http://groups.yahoo.com/group/rss-media/

              <*> To unsubscribe from this group, send an email to:
              rss-media-unsubscribe@yahoogroups.com

              <*> Your use of Yahoo! Groups is subject to:
              http://docs.yahoo.com/info/terms/



              You are all set.

            • Andris Jansons
              You are all set. nick gogerty wrote: We will soon be releasing a media RSS player that support music and videos inside of Outlook
              Message 6 of 14 , Sep 18 12:13 PM
                You are all set.

                nick gogerty <nick@...> wrote:
                We will soon be releasing a media RSS player that support music and videos inside of Outlook Express and Outlook.
                 
                Anyone interested in participating in the Beta please contact me.
                 
                In the meantime we publish some RSS tips about media at http://www.inclue.com/RSSGuidelines.pdf
                 
                Our RSS player will support most media types, object embeds, enclosures and flash. 
                 
                Media vendors can put a store inside the feed or full HTML.  Also you may be interested in how other media sites such as Google, and YouTube handle media, have a look at feed you can generate at www.feedgit.com
                 
                best,
                 
                Nick Gogerty
                CEO
                inclue! ...video RSS feed player
                 

              • Andris Jansons
                You are all set. ... I m interested in what you have planned. If you don t mind, post the feed here or email me directly at davidh@yahoo-inc.com ... Speaking
                Message 7 of 14 , Sep 18 12:15 PM
                  You are all set.

                  David Hall <daviddhall@...> wrote:
                  "Vadim Zaliva" wrote:
                  >
                  > Hi!
                  >
                  > I have simple feed in which each item is related to image posted
                  > by the user. I would now want to provide enclosures link at this point
                  > to avoid unecessry downloads. Instead I woudl rather provide "player"
                  > url via media:RSS.

                  I'm interested in what you have planned. If you don't mind, post the
                  feed here or email me directly at davidh@...

                  > Is my my understading of the spec is correct and following
                  > would be sufficient:
                  >
                  > 1. Add media namespace definition to 'rss' element.
                  >
                  > 2. Add empty 'media:content' element to each item (all attributes
                  > seems to be optional)

                  Speaking strictly from the specification's standpoint, I guess you
                  wouldn't even need media:content. Whether or not the various rendering
                  engines would recognize what you are doing, I'm not exactly sure.

                  > 3. Add 'media:player' element to each item with 'url' attribute for
                  > player.
                  >
                  > I understand that I could and should if possible provide more meta
                  > data in my feed, like content type, etc., but I would like to
                  > understand what are minimal additions and go from there.
                  >
                  > Somehow related question - what it takes to hint My Yahoo to show
                  > my feeds in "Media" layout when they added?

                  I've been talking lately with the My Yahoo folks and we were
                  discussing this. The way I see it, there are two types of media rich
                  feeds. Ones devoted specifically towards media only (example:
                  podcasting) and ones that are mixed-media (example: a blog with images
                  attached). Because these feeds "function" differently, you'd probably
                  want to render the two types differently.

                  Apparently, it's a little difficult to accurately figure out which
                  type a feed belongs to. One of the suggestions was to create some sort
                  of hint, just as you describe. I'm not exactly sure how that might
                  look in media rss, or if it's even something we should do. Thoughts?

                  -David






                  Yahoo! Groups Links

                  <*> To visit your group on the web, go to:
                  http://groups.yahoo.com/group/rss-media/

                  <*> To unsubscribe from this group, send an email to:
                  rss-media-unsubscribe@yahoogroups.com

                  <*> Your use of Yahoo! Groups is subject to:
                  http://docs.yahoo.com/info/terms/





                • Cameron Knowlton
                  this if #$%^&*( killing me! can anyone here answer this riddle... how the #$%^ do you get the value of an element containing : in its name, i.e.
                  Message 8 of 14 , Nov 6, 2006
                    this if #$%^&*( killing me! can anyone here answer this riddle... how the #$%^ do you get the value of an element containing : in its name, i.e. media:keywords:

                    this does NOT work:

                    let $keywords:= string($item/media:keywords)



                    apparently, using a : in the name of the element is killing me, but we can't change the element name obviously. why would someone at yahoo choose to use a : in the element name?!?


                    how do you get around this problem????!?!?!?!?!?!??!?!
                    how do you get around this problem????!?!?!?!?!?!??!?!
                    how do you get around this problem????!?!?!?!?!?!??!?!
                    how do you get around this problem????!?!?!?!?!?!??!?!

                    thanks in advance!
                    cameron

                    --
                    -----------------------------------------------
                    Cameron Knowlton
                    iGods Internet Marketing
                    cameronk@...
                    www.igods.com
                    P: 250.382.0226
                  • Markus Sandy
                    hi cameron this seems like a namespace context issue perhaps this relates: http://tech.groups.yahoo.com/group/rss-media/message/928 markus ... Markus Sandy
                    Message 9 of 14 , Nov 6, 2006
                      hi cameron

                      this seems like a namespace context issue

                      perhaps this relates:

                      http://tech.groups.yahoo.com/group/rss-media/message/928

                      markus



                      On Nov 6, 2006, at 1:59 AM, Cameron Knowlton wrote:

                      > this if #$%^&*( killing me! can anyone here answer this riddle... how
                      > the #$%^ do you get the value of an element containing : in its name,
                      > i.e. media:keywords:
                      >
                      > this does NOT work:
                      >
                      > let $keywords:= string($item/media:keywords)
                      >
                      > apparently, using a : in the name of the element is killing me, but
                      > we can't change the element name obviously. why would someone at yahoo
                      > choose to use a : in the element name?!?
                      >
                      > how do you get around this problem????!?!?!?!?!?!??!?!
                      > how do you get around this problem????!?!?!?!?!?!??!?!
                      > how do you get around this problem????!?!?!?!?!?!??!?!
                      > how do you get around this problem????!?!?!?!?!?!??!?!
                      >
                      > thanks in advance!
                      > cameron
                      >
                      > --


                      ---
                      Markus Sandy
                      http://feeds.feedburner.com/havemoneywillvlog
                      http://feeds.feedburner.com/apperceptions
                      http://feeds.feedburner.com/digitaldojo
                      http://feeds.feedburner.com/spinflow
                    • Cameron Knowlton
                      ... great thinking Markus! unfortunately, I m using a different language than Java (I m using Virtuoso http://www.openlinksw.com/virtuoso/ ) I did however
                      Message 10 of 14 , Nov 6, 2006
                        >hi cameron
                        >
                        >this seems like a namespace context issue
                        >
                        >perhaps this relates:
                        >
                        >http://tech.groups.yahoo.com/group/rss-media/message/928
                        >
                        >markus
                        >
                        >
                        >
                        >On Nov 6, 2006, at 1:59 AM, Cameron Knowlton wrote:
                        >
                        >>this if #$%^&*( killing me! can anyone here answer this riddle... how the #$%^ do you get the value of an element containing : in its name, i.e. media:keywords:
                        >>
                        >> this does NOT work:
                        >>
                        >> let $keywords:= string($item/media:keywords)
                        >>
                        >> apparently, using a : in the name of the element is killing me, but we can't change the element name obviously. why would someone at yahoo choose to use a : in the element name?!?
                        >>
                        >> how do you get around this problem????!?!?!?!?!?!??!?!
                        >> how do you get around this problem????!?!?!?!?!?!??!?!
                        >> how do you get around this problem????!?!?!?!?!?!??!?!
                        >> how do you get around this problem????!?!?!?!?!?!??!?!
                        >>
                        >> thanks in advance!
                        >> cameron
                        >>

                        great thinking Markus! unfortunately, I'm using a different language than Java (I'm using Virtuoso http://www.openlinksw.com/virtuoso/ )

                        I did however declare the namespace inside my Xquery (did I declare this correctly? it does seem to work):

                        _theResult:= xquery_eval (concat('
                        declare namespace media="urn:yahoo:media";

                        let $d:= document("', _mediaRSSpath, '")
                        let $item:= $d//item[guid="', _guid, '"]

                        let $title:= string($item/title)
                        let $description:= string($item/description)
                        let $keywords:= string($item/media:keywords)
                        let $link:= string($item/link)
                        let $guid:= string($item/guid)
                        let $enclosureURL:= string($item/enclosure/@url)
                        let $length:= string($item/enclosure/@length)
                        let $type:= string($item/enclosure/@type)

                        return
                        <snip>


                        This works so well for everything except for the media:keywords element... I'm guessing that this is a problem with Virtuoso, since I've seen one or two other examples on the net since I messaged the list that *do* use :s in the element name.

                        I have a message into Openlink about the Xquery, thanks for all your support in the mean time, folks.

                        cheers
                        Cameron Knowlton
                        --
                        -----------------------------------------------
                        Cameron Knowlton
                        iGods Internet Marketing
                        cameronk@...
                        www.igods.com
                        P: 250.382.0226
                      • Brendan Quinn
                        From the spec, http://search.yahoo.com/mrss/ ... The namespace for Media RSS is defined to be: http://search.yahoo.com/mrss/ So try declare namespace
                        Message 11 of 14 , Nov 7, 2006
                          From the spec, http://search.yahoo.com/mrss/ ...

                          "The namespace for Media RSS is defined to be:
                          http://search.yahoo.com/mrss/ "

                          So try
                          declare namespace media="http://search.yahoo.com/mrss/";

                          In your xquery function.

                          There's an example here:
                          http://docs.openlinksw.com/virtuoso/fn_xml_namespace_scope.html#ex_xml_n
                          amespace_scope

                          Basically the URI of the namespace should match the xmlns:media="..."
                          bit inside the Media RSS document. The same goes for any XML namespace.

                          Brendan.

                          -----Original Message-----
                          From: rss-media@yahoogroups.com [mailto:rss-media@yahoogroups.com] On
                          Behalf Of Cameron Knowlton
                          Sent: 06 November 2006 18:24
                          To: rss-media@yahoogroups.com
                          Subject: Re: [rss-media] xquery and media:keywords

                          >hi cameron
                          >
                          >this seems like a namespace context issue
                          >
                          >perhaps this relates:
                          >
                          >http://tech.groups.yahoo.com/group/rss-media/message/928
                          >
                          >markus
                          >
                          >
                          >
                          >On Nov 6, 2006, at 1:59 AM, Cameron Knowlton wrote:
                          >
                          >>this if #$%^&*( killing me! can anyone here answer this riddle... how
                          the #$%^ do you get the value of an element containing : in its name,
                          i.e. media:keywords:
                          >>
                          >> this does NOT work:
                          >>
                          >> let $keywords:= string($item/media:keywords)
                          >>
                          >> apparently, using a : in the name of the element is killing me, but
                          we can't change the element name obviously. why would someone at yahoo
                          choose to use a : in the element name?!?
                          >>
                          >> how do you get around this problem????!?!?!?!?!?!??!?!
                          >> how do you get around this problem????!?!?!?!?!?!??!?!
                          >> how do you get around this problem????!?!?!?!?!?!??!?!
                          >> how do you get around this problem????!?!?!?!?!?!??!?!
                          >>
                          >> thanks in advance!
                          >> cameron
                          >>

                          great thinking Markus! unfortunately, I'm using a different language
                          than Java (I'm using Virtuoso http://www.openlinksw.com/virtuoso/ )

                          I did however declare the namespace inside my Xquery (did I declare this
                          correctly? it does seem to work):

                          _theResult:= xquery_eval (concat('
                          declare namespace media="urn:yahoo:media";

                          let $d:= document("', _mediaRSSpath, '") let $item:= $d//item[guid="',
                          _guid, '"]

                          let $title:= string($item/title)
                          let $description:= string($item/description) let $keywords:=
                          string($item/media:keywords) let $link:= string($item/link) let $guid:=
                          string($item/guid) let $enclosureURL:= string($item/enclosure/@url) let
                          $length:= string($item/enclosure/@length) let $type:=
                          string($item/enclosure/@type)

                          return
                          <snip>


                          This works so well for everything except for the media:keywords
                          element... I'm guessing that this is a problem with Virtuoso, since I've
                          seen one or two other examples on the net since I messaged the list that
                          *do* use :s in the element name.

                          I have a message into Openlink about the Xquery, thanks for all your
                          support in the mean time, folks.

                          cheers
                          Cameron Knowlton
                          --
                          -----------------------------------------------
                          Cameron Knowlton
                          iGods Internet Marketing
                          cameronk@...
                          www.igods.com
                          P: 250.382.0226




                          Yahoo! Groups Links





                          http://www.bbc.co.uk/
                          This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
                          If you have received it in error, please delete it from your system.
                          Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
                          Please note that the BBC monitors e-mails sent or received.
                          Further communication will signify your consent to this.
                        • Cameron Knowlton
                          RE: [rss-media] xquery and media:keywords nope, I tried this, same result (nothing): _theResult:= xquery_eval (concat( declare namespace
                          Message 12 of 14 , Nov 8, 2006
                            RE: [rss-media] xquery and media:keywords
                            nope, I tried this, same result (nothing):

                            _theResult:= xquery_eval (concat('
                            declare namespace media="http://search.yahoo.com/mrss/";

                            let $d:= document("', _mediaRSSpath, '")
                            let $item:= $d//item[guid="', _guid, '"]

                            let $title:= string($item/title)
                            let $description:= string($item/description)
                            let $keywords:= string($item/keywords)
                            let $tags:= replace($keywords, ",", "")
                            let $link:= string($item/link)
                            let $guid:= string($item/guid)
                            let $enclosureURL:= string($item/enclosure/@url)
                            let $length:= string($item/enclosure/@length)
                            let $type:= string($item/enclosure/@type)


                            From the spec, http://search.yahoo.com/mrss/ ...

                            "The namespace for Media RSS is defined to be:
                            http://search.yahoo.com/mrss/ "

                            So try
                            declare namespace media="http://search.yahoo.com/mrss/ ";

                            In your xquery function.

                            There's an example here:
                            http://docs.openlinksw.com/virtuoso/fn_xml_namespace_scope.html#ex_xml_n
                            amespace_scope

                            Basically the URI of the namespace should match the xmlns:media="..."
                            bit inside the Media RSS document. The same goes for any XML namespace.

                            Brendan.

                            -----Original Message-----
                            From: rss-media@yahoogroups.com [mailto:rss-media@yahoogroups.com ] On
                            Behalf Of Cameron Knowlton
                            Sent: 06 November 2006 18:24
                            To: rss-media@yahoogroups.com
                            Subject: Re: [rss-media] xquery and media:keywords

                            >hi cameron
                            >
                            >this seems like a namespace context issue
                            >
                            >perhaps this relates:
                            >
                            >http://tech.groups.yahoo.com/group/rss-media/message/928
                            >
                            >markus
                            >
                            >
                            >
                            >On Nov 6, 2006, at 1:59 AM, Cameron Knowlton wrote:
                            >
                            >>this if #$%^&*( killing me! can anyone here answer this riddle... how
                            the #$%^ do you get the value of an element containing : in its name,
                            i.e. media:keywords:
                            >>
                            >> this does NOT work:
                            >>
                            >> let $keywords:= string($item/media:keywords)
                            >>
                            >> apparently, using a : in the name of the element is killing me, but
                            we can't change the element name obviously. why would someone at yahoo
                            choose to use a : in the element name?!?
                            >>
                            >> how do you get around this problem????!?!?!?!?!?!??!?!
                            >> how do you get around this problem????!?!?!?!?!?!??!?!
                            >> how do you get around this problem????!?!?!?!?!?!??!?!
                            >> how do you get around this problem????!?!?!?!?!?!??!?!
                            >>
                            >> thanks in advance!
                            >> cameron
                            >>

                            great thinking Markus! unfortunately, I'm using a different language
                            than Java (I'm using Virtuoso http://www.openlinksw.com/virtuoso/ )

                            I did however declare the namespace inside my Xquery (did I declare this
                            correctly? it does seem to work):

                            _theResult:= xquery_eval (concat('
                            declare namespace media="urn:yahoo:media";

                            let $d:= document("', _mediaRSSpath, '") let $item:= $d//item[guid="',
                            _guid, '"]

                            let $title:= string($item/title)
                            let $description:= string($item/description) let $keywords:=
                            string($item/media:keywords) let $link:= string($item/link) let $guid:=
                            string($item/guid) let $enclosureURL:= string($item/enclosure/@url) let
                            $length:= string($item/enclosure/@length) let $type:=
                            string($item/enclosure/@type)

                            return
                            <snip>

                            This works so well for everything except for the media:keywords
                            element... I'm guessing that this is a problem with Virtuoso, since I've
                            seen one or two other examples on the net since I messaged the list that
                            *do* use :s in the element name.

                            I have a message into Openlink about the Xquery, thanks for all your
                            support in the mean time, folks.

                            cheers
                            Cameron Knowlton
                            --
                            -----------------------------------------------
                            Cameron Knowlton

                            --
                            -----------------------------------------------
                            Cameron Knowlton
                            iGods Internet Marketing
                            cameronk@...
                            www.igods.com
                            P: 250.382.0226
                            -- 
                            
                            -----------------------------------------------
                            Cameron Knowlton
                            iGods Internet Marketing
                            cameronk@...
                            www.igods.com
                            P: 250.382.0226
                          • Brendan Quinn
                            I checked in the XQuery use cases spec and there s a section on namespaces: http://www.w3.org/TR/2005/WD-xquery-use-cases-20050404/#ns so, based on this
                            Message 13 of 14 , Nov 10, 2006
                              RE: [rss-media] xquery and media:keywords
                              I checked in the XQuery use cases spec and there's a section on namespaces: http://www.w3.org/TR/2005/WD-xquery-use-cases-20050404/#ns
                               
                              so, based on this example from the use case spec...
                               
                               declare namespace music = "http://www.example.org/music/records";

                              <Q2>
                                {
                                  doc("auction.xml")//music:title
                                }
                              </Q2>
                               
                              I would guess that you have to say
                               
                              let $keywords:= string($item/media:keywords)
                               
                              rather than just "keywords" on its own. Which makes sense, as you might have <keywords> in the default namespace, and <media:keywords> representing a different namespace, and you want to be able to differentiate between them.
                               
                              Sorry but I don't have a working XQuery engine locally, and I can't find anything on the web that lets you query over arbitrary URLs, so I can't test the theory. But that might get you a bit closer :-)
                               
                              Brendan.


                              From: rss-media@yahoogroups.com [mailto:rss-media@yahoogroups.com] On Behalf Of Cameron Knowlton
                              Sent: 08 November 2006 23:13
                              To: rss-media@yahoogroups.com
                              Subject: RE: [rss-media] xquery and media:keywords

                              nope, I tried this, same result (nothing):

                              _theResult:= xquery_eval (concat('
                              declare namespace media="http://search.yahoo.com/mrss/";

                              let $d:= document("', _mediaRSSpath, '")
                              let $item:= $d//item[guid="', _guid, '"]

                              let $title:= string($item/title)
                              let $description:= string($item/description)
                              let $keywords:= string($item/keywords)
                              let $tags:= replace($keywords, ",", "")
                              let $link:= string($item/link)
                              let $guid:= string($item/guid)
                              let $enclosureURL:= string($item/enclosure/@url)
                              let $length:= string($item/enclosure/@length)
                              let $type:= string($item/enclosure/@type)


                              From the spec, http://search.yahoo.com/mrss/ ...

                              "The namespace for Media RSS is defined to be:
                              http://search.yahoo.com/mrss/ "

                              So try
                              declare namespace media="http://search.yahoo.com/mrss/";

                              In your xquery function.

                              There's an example here:
                              http://docs.openlinksw.com/virtuoso/fn_xml_namespace_scope.html#ex_xml_n
                              amespace_scope

                              Basically the URI of the namespace should match the xmlns:media="..."
                              bit inside the Media RSS document. The same goes for any XML namespace.

                              Brendan.

                              -----Original Message-----
                              From: rss-media@yahoogroups.com [mailto:rss-media@yahoogroups.com] On
                              Behalf Of Cameron Knowlton
                              Sent: 06 November 2006 18:24
                              To: rss-media@yahoogroups.com
                              Subject: Re: [rss-media] xquery and media:keywords

                              >hi cameron
                              >
                              >this seems like a namespace context issue
                              >
                              >perhaps this relates:
                              >
                              >http://tech.groups.yahoo.com/group/rss-media/message/928
                              >
                              >markus
                              >
                              >
                              >
                              >On Nov 6, 2006, at 1:59 AM, Cameron Knowlton wrote:
                              >
                              >>this if #$%^&*( killing me! can anyone here answer this riddle... how
                              the #$%^ do you get the value of an element containing : in its name,
                              i.e. media:keywords:
                              >>
                              >> this does NOT work:
                              >>
                              >> let $keywords:= string($item/media:keywords)
                              >>
                              >> apparently, using a : in the name of the element is killing me, but
                              we can't change the element name obviously. why would someone at yahoo
                              choose to use a : in the element name?!?
                              >>
                              >> how do you get around this problem????!?!?!?!?!?!??!?!
                              >> how do you get around this problem????!?!?!?!?!?!??!?!
                              >> how do you get around this problem????!?!?!?!?!?!??!?!
                              >> how do you get around this problem????!?!?!?!?!?!??!?!
                              >>
                              >> thanks in advance!
                              >> cameron
                              >>

                              great thinking Markus! unfortunately, I'm using a different language
                              than Java (I'm using Virtuoso http://www.openlinksw.com/virtuoso/ )

                              I did however declare the namespace inside my Xquery (did I declare this
                              correctly? it does seem to work):

                              _theResult:= xquery_eval (concat('
                              declare namespace media="urn:yahoo:media";

                              let $d:= document("', _mediaRSSpath, '") let $item:= $d//item[guid="',
                              _guid, '"]

                              let $title:= string($item/title)
                              let $description:= string($item/description) let $keywords:=
                              string($item/media:keywords) let $link:= string($item/link) let $guid:=
                              string($item/guid) let $enclosureURL:= string($item/enclosure/@url) let
                              $length:= string($item/enclosure/@length) let $type:=
                              string($item/enclosure/@type)

                              return
                              <snip>

                              This works so well for everything except for the media:keywords
                              element... I'm guessing that this is a problem with Virtuoso, since I've
                              seen one or two other examples on the net since I messaged the list that
                              *do* use :s in the element name.

                              I have a message into Openlink about the Xquery, thanks for all your
                              support in the mean time, folks.

                              cheers
                              Cameron Knowlton
                              --
                              -----------------------------------------------
                              Cameron Knowlton

                              --
                              -----------------------------------------------
                              Cameron Knowlton
                              iGods Internet Marketing
                              cameronk@...
                              www.igods.com
                              P: 250.382.0226
                              -- 
                              
                              -----------------------------------------------
                              Cameron Knowlton
                              iGods Internet Marketing
                              cameronk@...
                              www.igods.com
                              P: 250.382.0226

                              http://www.bbc.co.uk
                              This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
                              If you have received it in error, please delete it from your system.
                              Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
                              Please note that the BBC monitors e-mails sent or received.
                              Further communication will signify your consent to this.
                            • Cameron Knowlton
                              RE: [rss-media] xquery and media:keywords give that man a cigar 8^) with the corrected namespace declaration, and Brendan s solution to use media:keywords,
                              Message 14 of 14 , Nov 10, 2006
                                RE: [rss-media] xquery and media:keywords
                                give that man a cigar  8^)

                                with the corrected namespace declaration, and Brendan's solution to use media:keywords, it's working like a charm

                                8^)

                                thanks Brendan,
                                Cameron Knowlton

                                I checked in the XQuery use cases spec and there's a section on namespaces: http://www.w3.org/TR/2005/WD-xquery-use-cases-20050404/#ns
                                 
                                so, based on this example from the use case spec...
                                 
                                 declare namespace music = "http://www.example.org/music/records";

                                <Q2>
                                  {
                                    doc("auction.xml")//music:title
                                  }
                                </Q2>
                                 
                                I would guess that you have to say
                                 
                                let $keywords:= string($item/media:keywords)
                                 
                                rather than just "keywords" on its own. Which makes sense, as you might have <keywords> in the default namespace, and <media:keywords> representing a different namespace, and you want to be able to differentiate between them.
                                 
                                Sorry but I don't have a working XQuery engine locally, and I can't find anything on the web that lets you query over arbitrary URLs, so I can't test the theory. But that might get you a bit closer :-)
                                 
                                Brendan.


                                From: rss-media@yahoogroups.com [mailto:rss-media@yahoogroups.com] On Behalf Of Cameron Knowlton
                                Sent: 08 November 2006 23:13
                                To: rss-media@yahoogroups.com
                                Subject: RE: [rss-media] xquery and media:keywords
                                nope, I tried this, same result (nothing):

                                _theResult:= xquery_eval (concat('
                                declare namespace media="http://search.yahoo.com/mrss/";

                                let $d:= document("', _mediaRSSpath, '")
                                let $item:= $d//item[guid="', _guid, '"]

                                let $title:= string($item/title)
                                let $description:= string($item/description)
                                let $keywords:= string($item/keywords)
                                let $tags:= replace($keywords, ",", "")
                                let $link:= string($item/link)
                                let $guid:= string($item/guid)
                                let $enclosureURL:= string($item/enclosure/@url)
                                let $length:= string($item/enclosure/@length)
                                let $type:= string($item/enclosure/@type)


                                From the spec, http://search.yahoo.com/mrss/ ...

                                "The namespace for Media RSS is defined to be:
                                http://search.yahoo.com/mrss/ "

                                So try
                                declare namespace media="http://search.yahoo.com/mrss/ ";

                                In your xquery function.

                                There's an example here:
                                http://docs.openlinksw.com/virtuoso/fn_xml_namespace_scope.html#ex_xml_n
                                amespace_scope

                                Basically the URI of the namespace should match the xmlns:media="..."
                                bit inside the Media RSS document. The same goes for any XML namespace.

                                Brendan.

                                -----Original Message-----
                                From: rss-media@yahoogroups.com [mailto:rss-media@yahoogroups.com ] On
                                Behalf Of Cameron Knowlton
                                Sent: 06 November 2006 18:24
                                To: rss-media@yahoogroups.com
                                Subject: Re: [rss-media] xquery and media:keywords

                                >hi cameron
                                >
                                >this seems like a namespace context issue
                                >
                                >perhaps this relates:
                                >
                                >http://tech.groups.yahoo.com/group/rss-media/message/928
                                >
                                >markus
                                >
                                >
                                >
                                >On Nov 6, 2006, at 1:59 AM, Cameron Knowlton wrote:
                                >
                                >>this if #$%^&*( killing me! can anyone here answer this riddle... how
                                the #$%^ do you get the value of an element containing : in its name,
                                i.e. media:keywords:
                                >>
                                >> this does NOT work:
                                >>
                                >> let $keywords:= string($item/media:keywords)
                                >>
                                >> apparently, using a : in the name of the element is killing me, but
                                we can't change the element name obviously. why would someone at yahoo
                                choose to use a : in the element name?!?
                                >>
                                >> how do you get around this problem????!?!?!?!?!?!??!?!
                                >> how do you get around this problem????!?!?!?!?!?!??!?!
                                >> how do you get around this problem????!?!?!?!?!?!??!?!
                                >> how do you get around this problem????!?!?!?!?!?!??!?!
                                >>
                                >> thanks in advance!
                                >> cameron
                                >>

                                great thinking Markus! unfortunately, I'm using a different language
                                than Java (I'm using Virtuoso http://www.openlinksw.com/virtuoso/ )

                                I did however declare the namespace inside my Xquery (did I declare this
                                correctly? it does seem to work):

                                _theResult:= xquery_eval (concat('
                                declare namespace media="urn:yahoo:media";

                                let $d:= document("', _mediaRSSpath, '") let $item:= $d//item[guid="',
                                _guid, '"]

                                let $title:= string($item/title)
                                let $description:= string($item/description) let $keywords:=
                                string($item/media:keywords) let $link:= string($item/link) let $guid:=
                                string($item/guid) let $enclosureURL:= string($item/enclosure/@url) let
                                $length:= string($item/enclosure/@length) let $type:=
                                string($item/enclosure/@type)

                                return
                                <snip>

                                This works so well for everything except for the media:keywords
                                element... I'm guessing that this is a problem with Virtuoso, since I've
                                seen one or two other examples on the net since I messaged the list that
                                *do* use :s in the element name.

                                I have a message into Openlink about the Xquery, thanks for all your
                                support in the mean time, folks.

                                cheers
                                Cameron Knowlton
                                --
                                -----------------------------------------------
                                Cameron Knowlton

                                --
                                -----------------------------------------------
                                Cameron Knowlton
                                iGods Internet Marketing
                                cameronk@...
                                www.igods.com
                                P: 250.382.0226
                                --
                                -----------------------------------------------
                                Cameron Knowlton
                                iGods Internet Marketing
                                cameronk@...
                                www.igods.com
                                P: 250.382.0226

                                http://www.bbc.co.uk
                                This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
                                If you have received it in error, please delete it from your system.
                                Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
                                Please note that the BBC monitors e-mails sent or received.
                                Further communication will signify your consent to this.


                                -- 
                                
                                -----------------------------------------------
                                Cameron Knowlton
                                iGods Internet Marketing
                                cameronk@...
                                www.igods.com
                                P: 250.382.0226
                              Your message has been successfully submitted and would be delivered to recipients shortly.