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

Re: [newsml] Re: Positional reference?

Expand Messages
  • Darko Gulija
    ... Correct. Content updates are performed by sending the NewsItem with only Update elements that contain InsertBefore, InsertAfter, Replace or Delete
    Message 1 of 7 , Oct 1, 2001
    • 0 Attachment
      At 15:05 9/28/2001 +0000, you wrote:
      >I was asking the same question.
      >
      >Though I noticed that in NewsML, there are some elements like
      >InsertBefore, InsertAfter, that seems to be for this purpose. I am
      >copying it down here.

      Correct.
      Content updates are performed by sending the NewsItem with only Update elements that contain InsertBefore, InsertAfter, Replace or Delete subelements. All those subelements, beside of eventually carying a new content, have an DuidRef attribute pointing to the element in the previous revision that insertion, replacement or deletion is to be performed on.
      So, you are able to change any element (NewsML or not) inside the ContentItem that has the Duid attribute (since this is the ancor for relpacement, deletion or insertion). If you whish to change NewsManagement metadata, you have to resend complete NewsMetadata element again.

      Strictly speking, NewsML specification covers only updating NewsML elements, but for the application it does not realy matter whether the element that carry Duid attribute was defined in NewsML DTD, internal subset or someplace else, unless the content format bans you to use Duid attribute (then you could use Namespaces, but this is another story)

      >However, I was unable to figure out what does "The NewsItem
      >into which it is to be inserted is the previous revision of the
      >current one" mean? Particularly, "the previous revision of the
      >current one"?

      Every NewsItem has an Identification element that contain globaly unique NewsIdentifier consisting of five components: ProviderId, DateId, NewsItemId, RevisionId and PublicIdentifier that contains an URN consisting of those four parts. The syntax is:
      urn:newsml:{ProviderId}:{DateId}:{NewsItemId}:{RevisionId}{RevisionId@Update}
      If you whish to change something in that document later, you may publish the next revision of it, by publishing a new NewsML document (in fact, a NewsItem) with the same ProviderId, DateId and NewsItemId parts and change only the RevisionId.
      NewsML receiving system should realize that this is the new revision of the same document and act accrodingly. You may resend the complete content or perform ony incremental update (that's what you asked for)

      So if you whish to "insert XXXX at a specific position within the text (content) of a document", you have to:
      1. Publish a NewsML document (e.g. urn:newsml:your.domain.com:01012001:1234:1) that has Duid attributes assigned to every element you may whish to address later.
      <NewsItem>
      <Identification> .....
      <PublicIdentifier>urn:newsml:your.domain.com:01012001:1234:1</PublicIdentifier>
      <Identification>
      <NewsComponent>
      <ContentItem Duid="CI001">
      <DataContent Duid="DC001">
      <para Duid="P001"> Some text </para>
      <para Duid="P002">Another one</para>
      ... close all

      2. To insert XXX after the first para, you have to publish a new revision of this NewsItem with Update element only:
      <NewsItem>
      <Identification> .....
      <PublicIdentifier>urn:newsml:your.domain.com:01012001:1234:2U</PublicIdentifier>
      <Identification>
      <Update>
      <InsertAfter DuidRef="#P001">
      <para Duid="P001a">XXX</para>
      ... close all

      3. If you whish to replace "Another one" paragraph with YYYY:

      <NewsItem>
      <Identification> .....
      <PublicIdentifier>urn:newsml:your.domain.com:01012001:1234:3U</PublicIdentifier>
      <Identification>
      <Update>
      <Replace DuidRef="#P002">
      <para Duid="P002"><someOtherMarkup>YYYY</someOtherMarkup></para>
      ... close all

      4. Your document should now (at the receiving side) look like:
      <NewsItem>
      <Identification> .....
      <PublicIdentifier>urn:newsml:your.domain.com:01012001:1234:4</PublicIdentifier>
      <Identification>
      <NewsComponent>
      <ContentItem Duid="CI001">
      <DataContent Duid="DC001">
      <para Duid="P001"> Some text </para>
      <para Duid="P001a">XXX</para>
      <para Duid="P002"><someOtherMarkup>YYYY</someOtherMarkup></para>
      ... close all

      The only problem with this approach is that you have to be sure that recipient has succesfuly received and is still keeping the previous version (since otherwise there wouldn't be anything to update), so the receiving system should be able to request the missing copy from the provider.

      >Can anybody highlight this? Thanks.

      It was a lenghty one, but hope it helped you.



      ====================================================================
      Darko Gulija tel: +385 1 48 08 800
      IT manager fax: +385 1 48 08 820
      Croatian News Agency (HINA) E-mail: Darko.Gulija@...
    • David Allen
      The insertion of the Duid provides a reference point for finding document elements. A NewsItem carries a unique ID that is only changed by issuing a new
      Message 2 of 7 , Oct 1, 2001
      • 0 Attachment
        The insertion of the Duid provides a reference point for finding document elements. A NewsItem carries a unique ID that is only changed by issuing a new
        revision. If an Update InsertBefore is made then this will allow the insertion of a new valid NewsComponent before one already existing with a given Duid.
        In doing so the NewsItem is raised to the next revision level. Its unique ID is changed by the final numeric character being incremented or increased.
        David Allen

        jb605@... wrote:

        > I was asking the same question.
        >
        > Though I noticed that in NewsML, there are some elements like
        > InsertBefore, InsertAfter, that seems to be for this purpose. I am
        > copying it down here.
        >
        > However, I was unable to figure out what does "The NewsItem
        > into which it is to be inserted is the previous revision of the
        > current one" mean? Particularly, "the previous revision of the
        > current one"?
        >
        > Can anybody highlight this? Thanks.
        >
        > <!--
        > ================================= InsertAfter ========
        > ==========================
        > An instruction to insert content after a designated element within
        > a NewsItem.
        > The content to be inserted is the content of the InsertAfter
        > element. The
        > NewsItem into which it is to be inserted is the previous revision
        > of the current
        > one, and the element after which it is to be inserted is the one
        > whose Duid
        > value is equal to the value of the InsertAfter element's DuidRef
        > attribute.
        > ==================================================
        > ==============================
        > -->
        > <!ELEMENT InsertAfter ANY>
        > <!ATTLIST InsertAfter
        > %localid;
        > DuidRef CDATA #REQUIRED
        > >
        >
        > --- In newsml@y..., Kevin Burton <kevin.burton@i...> wrote:
        > > I understand that with NewsML you can have multiple
        > resources, media types,
        > > etc. I would like to know if there is a way in NewsML to specifiy
        > the
        > > position of an item or item reference in a document.
        > >
        > >
        > > ----------------------------------------------
        > > --------------------XXXXX-----------------
        > > ----------------------------------------------
        > >
        > > I would like to insert something like XXXXX at a specific
        > position within
        > > the text (content) of a document. Maybe this is an NITF
        > question? If so is
        > > there anyone that can redirect me to someplace that I can find
        > and answer?
        > >
        > > Thank you.
        > >
        > > Kevin Burton
        > > Kevin.Burton@i... <mailto:Kevin.burton@i...>
        > >
        > >
        > >
        > > [Non-text portions of this message have been removed]
        >
        >
        > To Post a message, send it to: newsml@...
        >
        > To Unsubscribe, send a blank message to: newsml-unsubscribe@...
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

        --
        International Press Telecommunications Council
        Working to improve the efficiency of News exchange.
        Visit our Web Site at http://www.iptc.org
      • Daniel Rivers-Moore
        The InsertBefore and InsertAfter elements are part of the Update mechanism. They are intended to allow you to issue a new revision of an identified NewsItem,
        Message 3 of 7 , Oct 1, 2001
        • 0 Attachment
          The InsertBefore and InsertAfter elements are part of the Update
          mechanism. They are intended to allow you to issue a new revision of an
          identified NewsItem, and add additional elements before or after
          existing ones in that NewsItem. But the 'before' and 'after' here means
          before and after in the NewsML document structure. It has nothing to do
          with what order ContentItems might be published in.

          None of the NewsML elements or IPTC TopicSets for metadata property
          values says anything about publication sequence. It would be possible to
          develop your own TopicSet for values of Role, where the meaning of the
          roles was explicitly related to publication sequence. But a cleaner
          solution would be the one Reuters has developed. This is to create a
          user-defined MetadataType for StoryOrder, and a Property for the
          sequence of an item within the story order.

          Daniel Rivers-Moore


          -----Original Message-----
          From: jb605@... [mailto:jb605@...]
          Sent: 28 September 2001 16:06
          To: newsml@yahoogroups.com
          Subject: [newsml] Re: Positional reference?


          I was asking the same question.

          Though I noticed that in NewsML, there are some elements like
          InsertBefore, InsertAfter, that seems to be for this purpose. I am
          copying it down here.

          However, I was unable to figure out what does "The NewsItem
          into which it is to be inserted is the previous revision of the
          current one" mean? Particularly, "the previous revision of the
          current one"?

          Can anybody highlight this? Thanks.

          <!--
          ================================= InsertAfter ========
          ==========================
          An instruction to insert content after a designated element within
          a NewsItem.
          The content to be inserted is the content of the InsertAfter
          element. The
          NewsItem into which it is to be inserted is the previous revision
          of the current
          one, and the element after which it is to be inserted is the one
          whose Duid
          value is equal to the value of the InsertAfter element's DuidRef
          attribute.
          ==================================================
          ==============================
          -->
          <!ELEMENT InsertAfter ANY>
          <!ATTLIST InsertAfter
          %localid;
          DuidRef CDATA #REQUIRED
          >


          --- In newsml@y..., Kevin Burton <kevin.burton@i...> wrote:
          > I understand that with NewsML you can have multiple
          resources, media types,
          > etc. I would like to know if there is a way in NewsML to specifiy
          the
          > position of an item or item reference in a document.
          >
          >
          > ----------------------------------------------
          > --------------------XXXXX-----------------
          > ----------------------------------------------
          >
          > I would like to insert something like XXXXX at a specific
          position within
          > the text (content) of a document. Maybe this is an NITF
          question? If so is
          > there anyone that can redirect me to someplace that I can find
          and answer?
          >
          > Thank you.
          >
          > Kevin Burton
          > Kevin.Burton@i... <mailto:Kevin.burton@i...>
          >
          >
          >
          > [Non-text portions of this message have been removed]



          To Post a message, send it to: newsml@...

          To Unsubscribe, send a blank message to: newsml-unsubscribe@...

          Your use of Yahoo! Groups is subject to
          http://docs.yahoo.com/info/terms/
        • Laurent Le Meur
          I Kevin, AFP solves this using the NITF tag : look inside our NewsML for dummies draft, uploaded to the yahoogroups site
          Message 4 of 7 , Oct 12, 2001
          • 0 Attachment
            I Kevin,

            AFP solves this using the NITF <media><media-reference> tag : look inside
            our "NewsML for dummies" draft, uploaded to the yahoogroups site
            http://groups.yahoo.com/group/newsml/files/, in the NewsML(afp) folder (you
            must be a subscriber to the list to get it). We'll put it on the AFP Web
            site when cleaned-up.

            Using this your illustration is put between paragraphs (not inside, this is
            the constraint).

            amts
            Laurent Le Meur
            AFP


            -----Message d'origine-----
            De : Kevin Burton [mailto:kevin.burton@...]
            Envoye : vendredi 28 septembre 2001 16:09
            A : newsml@yahoogroups.com
            Objet : [newsml] Positional reference?


            I understand that with NewsML you can have multiple resources, media types,
            etc. I would like to know if there is a way in NewsML to specifiy the
            position of an item or item reference in a document.


            ----------------------------------------------
            --------------------XXXXX-----------------
            ----------------------------------------------

            I would like to insert something like XXXXX at a specific position within
            the text (content) of a document. Maybe this is an NITF question? If so is
            there anyone that can redirect me to someplace that I can find and answer?

            Thank you.a subscriber to the list

            Kevin Burton
            Kevin.Burton@... <mailto:Kevin.burton@...>



            [Non-text portions of this message have been removed]


            To Post a message, send it to: newsml@...

            To Unsubscribe, send a blank message to: newsml-unsubscribe@...

            Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          Your message has been successfully submitted and would be delivered to recipients shortly.