Date   

Affiliations for organisations in G2?

Brendan Quinn
 

Hi everyone,

 

  1. I’m finalising the Trust Indicators document and one of the things that they want to express is an organisation’s membership of some kind of body, including organisations such as IPTC, RSF, WAN-IFRA as well as the Trust Project itself.

 

We have <affiliation> under <personDetails> but nothing equivalent under <organisationDetails> as far as I can see.

 

  1. Separately, the affiliation docs in the Guidelines say:

Affiliation <affiliation>

An affiliation of the person to an organisation.

<affiliation type="orgnat:employer" qcode="org:ECB">

    <name>European Central Bank</name>

</affiliation>

Note that the @type refers to the type of organisation – not the type of relationship with the person. In the example we use scheme "orgnat" to describe the Nature of the Organisation as a Bank.

The note at the end there seems to contradict the example. The “type” attribute doesn’t describe that the nature of the organisation is a bank, it seems to indicate the type of relationship between the person and the organisation (ie an employer/employee relationship).

 

So is the example wrong, or is the note wrong, or am I misunderstanding something?

 

Thoughts?

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn


Re: Using G2 for Music ?

Dave Compton <dave.compton@...>
 

Hi

TR handles audio as part of a video package, which includes refs to various News Items:

- Video: multiple transcodings

- Audio: multiple encodings

- Text: Script

- Picture: Salient images, in addition to keyframes

Rgds
DC

 

From: iptc-newsml-g2@groups.io <iptc-newsml-g2@groups.io> On Behalf Of John Evans via Groups.Io
Sent: 10 February 2020 11:19
To: iptc-newsml-g2@groups.io
Subject: Re: [iptc-newsml-g2] Using G2 for Music ?

 

Thanks Brendan

 

From: iptc-newsml-g2@groups.io [mailto:iptc-newsml-g2@groups.io] On Behalf Of Brendan Quinn
Sent: 10 February 2020 10:00
To: iptc-newsml-g2@groups.io
Subject: Re: [iptc-newsml-g2] Using G2 for Music ?

 

John wrote:

  • What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Actually, exiftool can read the ID3 tags from MP3 files just as easily as it reads IPTC tags from images!

 

% exiftool ~/Music/ghost_clip.mp3 

ExifTool Version Number         : 10.80

File Name                       : ghost_clip.mp3

Directory                       : /Users/brendan/Music

File Size                       : 593 kB

File Modification Date/Time     : 2009:02:18 17:02:34+02:00

File Access Date/Time           : 2018:02:28 14:38:55+02:00

File Inode Change Date/Time     : 2014:10:08 16:40:08+03:00

File Permissions                : rw-r--r--

File Type                       : MP3

File Type Extension             : mp3

MIME Type                       : audio/mpeg

MPEG Audio Version              : 1

Audio Layer                     : 3

Audio Bitrate                   : 128 kbps

Sample Rate                     : 44100

Channel Mode                    : Joint Stereo

MS Stereo                       : On

Intensity Stereo                : Off

Copyright Flag                  : False

Original Media                  : True

Emphasis                        : None

ID3 Size                        : 119

Title                           : Giving Up the Ghost (excerpt)

Artist                          : DJ Shadow

Album                           : The Private Press

Genre                           : Electronic

Duration                        : 0:00:37 (approx)

 

It really is like a swiss army knife for metadata 😊

 

Otherwise there are many other ID3 reading libraries available.

 

Hope that helps,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn

 

From: <iptc-newsml-g2@groups.io> on behalf of John Evans <john@...>
Reply to: <iptc-newsml-g2@groups.io>
Date: Monday, 10 February 2020 at 11:52
To: "iptc-newsml-g2@groups.io" <iptc-newsml-g2@groups.io>
Subject: Re: [iptc-newsml-g2] Using G2 for Music ?

 

Our customer Radio Romania has 750 users, many of whom are uploading a sound file (mp3) from local radio stations to the national station, which I turn into a newsItem.

The only slight modification I have is that they add some text (a description of the audio file) which I include as a property of the same newsItem, rather than create a text newsitem as part of a package.

 

What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Kind regards

 

John Evans

Managing Director

Transtel Communications ltd

www.Transtel.com

 

From: iptc-newsml-g2@groups.io [mailto:iptc-newsml-g2@groups.io] On Behalf Of r.schmidtnia via Groups.Io
Sent: 09 February 2020 19:58
To: iptc-newsml-g2@groups.io
Subject: [iptc-newsml-g2] Using G2 for Music ?

 


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Re: Using G2 for Music ?

John Evans
 

Thanks Brendan

 

From: iptc-newsml-g2@groups.io [mailto:iptc-newsml-g2@groups.io] On Behalf Of Brendan Quinn
Sent: 10 February 2020 10:00
To: iptc-newsml-g2@groups.io
Subject: Re: [iptc-newsml-g2] Using G2 for Music ?

 

John wrote:

  • What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Actually, exiftool can read the ID3 tags from MP3 files just as easily as it reads IPTC tags from images!

 

% exiftool ~/Music/ghost_clip.mp3 

ExifTool Version Number         : 10.80

File Name                       : ghost_clip.mp3

Directory                       : /Users/brendan/Music

File Size                       : 593 kB

File Modification Date/Time     : 2009:02:18 17:02:34+02:00

File Access Date/Time           : 2018:02:28 14:38:55+02:00

File Inode Change Date/Time     : 2014:10:08 16:40:08+03:00

File Permissions                : rw-r--r--

File Type                       : MP3

File Type Extension             : mp3

MIME Type                       : audio/mpeg

MPEG Audio Version              : 1

Audio Layer                     : 3

Audio Bitrate                   : 128 kbps

Sample Rate                     : 44100

Channel Mode                    : Joint Stereo

MS Stereo                       : On

Intensity Stereo                : Off

Copyright Flag                  : False

Original Media                  : True

Emphasis                        : None

ID3 Size                        : 119

Title                           : Giving Up the Ghost (excerpt)

Artist                          : DJ Shadow

Album                           : The Private Press

Genre                           : Electronic

Duration                        : 0:00:37 (approx)

 

It really is like a swiss army knife for metadata 😊

 

Otherwise there are many other ID3 reading libraries available.

 

Hope that helps,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn

 

From: <iptc-newsml-g2@groups.io> on behalf of John Evans <john@...>
Reply to: <iptc-newsml-g2@groups.io>
Date: Monday, 10 February 2020 at 11:52
To: "iptc-newsml-g2@groups.io" <iptc-newsml-g2@groups.io>
Subject: Re: [iptc-newsml-g2] Using G2 for Music ?

 

Our customer Radio Romania has 750 users, many of whom are uploading a sound file (mp3) from local radio stations to the national station, which I turn into a newsItem.

The only slight modification I have is that they add some text (a description of the audio file) which I include as a property of the same newsItem, rather than create a text newsitem as part of a package.

 

What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Kind regards

 

John Evans

Managing Director

Transtel Communications ltd

www.Transtel.com

 

From: iptc-newsml-g2@groups.io [mailto:iptc-newsml-g2@groups.io] On Behalf Of r.schmidtnia via Groups.Io
Sent: 09 February 2020 19:58
To: iptc-newsml-g2@groups.io
Subject: [iptc-newsml-g2] Using G2 for Music ?

 


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Re: Using G2 for Music ?

Johan Lindgren
 

We don't do audio specifically, but we handle videos in ninja/newsml and I guess the same principles could apply to audio. Description, metadata and content in various formats/encodings.


Johan

Johan Lindgren, TT, 070-6528007


Den mån 10 feb. 2020 kl 10:45 skrev r.schmidtnia via Groups.Io <r.schmidtnia=googlemail.com@groups.io>:


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Re: Using G2 for Music ?

Brendan Quinn
 

John wrote:

  • What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Actually, exiftool can read the ID3 tags from MP3 files just as easily as it reads IPTC tags from images!

 

% exiftool ~/Music/ghost_clip.mp3 

ExifTool Version Number         : 10.80

File Name                       : ghost_clip.mp3

Directory                       : /Users/brendan/Music

File Size                       : 593 kB

File Modification Date/Time     : 2009:02:18 17:02:34+02:00

File Access Date/Time           : 2018:02:28 14:38:55+02:00

File Inode Change Date/Time     : 2014:10:08 16:40:08+03:00

File Permissions                : rw-r--r--

File Type                       : MP3

File Type Extension             : mp3

MIME Type                       : audio/mpeg

MPEG Audio Version              : 1

Audio Layer                     : 3

Audio Bitrate                   : 128 kbps

Sample Rate                     : 44100

Channel Mode                    : Joint Stereo

MS Stereo                       : On

Intensity Stereo                : Off

Copyright Flag                  : False

Original Media                  : True

Emphasis                        : None

ID3 Size                        : 119

Title                           : Giving Up the Ghost (excerpt)

Artist                          : DJ Shadow

Album                           : The Private Press

Genre                           : Electronic

Duration                        : 0:00:37 (approx)

 

It really is like a swiss army knife for metadata 😊

 

Otherwise there are many other ID3 reading libraries available.

 

Hope that helps,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn

 

From: <iptc-newsml-g2@groups.io> on behalf of John Evans <john@...>
Reply to: <iptc-newsml-g2@groups.io>
Date: Monday, 10 February 2020 at 11:52
To: "iptc-newsml-g2@groups.io" <iptc-newsml-g2@groups.io>
Subject: Re: [iptc-newsml-g2] Using G2 for Music ?

 

Our customer Radio Romania has 750 users, many of whom are uploading a sound file (mp3) from local radio stations to the national station, which I turn into a newsItem.

The only slight modification I have is that they add some text (a description of the audio file) which I include as a property of the same newsItem, rather than create a text newsitem as part of a package.

 

What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Kind regards

 

John Evans

Managing Director

Transtel Communications ltd

www.Transtel.com

 

From: iptc-newsml-g2@groups.io [mailto:iptc-newsml-g2@groups.io] On Behalf Of r.schmidtnia via Groups.Io
Sent: 09 February 2020 19:58
To: iptc-newsml-g2@groups.io
Subject: [iptc-newsml-g2] Using G2 for Music ?

 


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Re: Using G2 for Music ?

John Evans
 

Our customer Radio Romania has 750 users, many of whom are uploading a sound file (mp3) from local radio stations to the national station, which I turn into a newsItem.

The only slight modification I have is that they add some text (a description of the audio file) which I include as a property of the same newsItem, rather than create a text newsitem as part of a package.

 

What I am not familiar with is how to pull metadata from the mp3 (as we see music apps can do) in the same way as we can interrogate the jpeg header.

 

Kind regards

 

John Evans

Managing Director

Transtel Communications ltd

www.Transtel.com

 

From: iptc-newsml-g2@groups.io [mailto:iptc-newsml-g2@groups.io] On Behalf Of r.schmidtnia via Groups.Io
Sent: 09 February 2020 19:58
To: iptc-newsml-g2@groups.io
Subject: [iptc-newsml-g2] Using G2 for Music ?

 


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Re: Using G2 for Music ?

Trond Husø
 

Music/sound = mp3? (or any music format (ogg etc))

 

Trond

 

 

From: "iptc-newsml-g2@groups.io" <iptc-newsml-g2@groups.io> on behalf of "r.schmidtnia via Groups.Io" <r.schmidtnia@...>
Reply to: "iptc-newsml-g2@groups.io" <iptc-newsml-g2@groups.io>
Date: Monday, 10 February 2020 at 10:45
To: "iptc-newsml-g2@groups.io" <iptc-newsml-g2@groups.io>
Subject: [iptc-newsml-g2] Using G2 for Music ?

 


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Using G2 for Music ?

Robert
 


Hi folks,

I have a use case, where we have to handle music- and sound- (tracks) together with other news items like news, video etc.

Does anybody has experiences in handling musi-/sound- (tracks) in G2? Does this make sense, or are there other better approches?

Thx
Robert


Announcing NewsML-G2 2.28 revision 2

Brendan Quinn
 

Hello everyone,

 

The IPTC News Architecture Working Group would like to announce that we have released revision 2 of NewsML-G2 2.28, covering some small errata as described in CR0207 at http://dev.iptc.org/G2-CR00207-fix-date-time-related-XML-Schema-data-type-errors.

 

Description of the change:

The attributes of some NewsML-G2 elements have a definition of "the date, and optionally, the time" but were erroneously given a datatype of xs:datetime. This is corrected in v2.28 to assigning the NewsML-G2 data type DateOptTimeType to these attributes:

·         the coversfrom and coversto attributes of planning (child of newsCoverage)

·         the coversfrom and coversto attributes of assignedTo (child of planning)

·         the timestamp attribute of hop (child of hopHistory)

·         the timestamp attribute of action (child of hop)

Rationale for the change:
NewsML-G2 has some elements and properties with a basic definition of covering date and time values and including in the free-text description "and optionally(,) the time".

All elements with such a definition have as datatype the NewsML-G2 DateOptTimeType or a derived one.
Most attributes with such a definition have as datatype the NewsML-G2 DateOptTimeType or a derived one.

A few attributes have as data type xs:dateTime which does NOT allow an optional use of the time part, it is mandatory.
To fix this error all these attributes should get DateOptTimeType as new datatype.


You can see a summary of all changes to NewsML-G2, including this one, on the “G2 Approved Changes” page on dev.iptc.org:

http://dev.iptc.org/G2-Approved-Changes

 

The schemas, XML schema documentation and example files have been updated at

https://www.iptc.org/std/NewsML-G2/2.28/

 

Please let us know if you have any questions about NewsML-G2 or suggestions about how we can make it better.

 

Best regards,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn


Hear the latest on NewsML-G2 at the IPTC Spring Meeting in Lisbon, April 8-10 2019

Brendan Quinn
 

Hi all,

 

I just wanted to make sure everyone was aware of the IPTC Spring Meeting coming up next month. Open to all IPTC Members, we will be discussing NewsML-G2 plus NewsCodes, SportsML, misinformation, AI and other topics over three days in Lisbon, Portugal.

 

More info at https://iptc.org/events/spring-meeting-2019/ and for IPTC members, https://iptc.org/moz/events/spring-meeting-2019/

 

The special hotel room rate offer ends this Friday, 8 March, so please get in quickly with your reservation!

 

If you have any questions, please let me know.

 

Best regards,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn

 


ANNOUNCE: NewsML-G2 2.28 now available

Brendan Quinn
 

Hi all,

 

We are happy to announce that the updated version 2.28 of NewsML-G2 is available as Developer Release.

 

The XML Schemas, the corresponding documentation, and example files are updated to 2.28.

 

Packages of version 2.28 files can be downloaded:

  • All XML Schemas  plus full documentation (about 60 MB) from https://www.iptc.org/std/NewsML-G2/NewsML-G2_2.28.zip
  • The same without XML Schema documentation in HTML (about 3 MB) from https://www.iptc.org/std/NewsML-G2/NewsML-G2_2.28-noXMLdocu.zip   

 

Find the newsml-g2 repository on GitHub tagged as a release: https://github.com/iptc/newsml-g2/tree/2.28.1/

 

All of the changes made in version 2.28 and earlier versions can be found on this page: http://dev.iptc.org/G2-Approved-Changes

 

The updated NewsML-G2 Implementation Guidelines are available as a web document now at https://www.iptc.org/std/NewsML-G2/guidelines . They have recently been updated to 2.27 and will soon be updated to 2.28.

 

In summary the changes are:

  • Add new element derivedFromValue. Previously we could say that elements were derived from a concept using the derivedFrom element. But if a system creates a new property based on another existing property, such as a slugline, there was no way of representing it.
  • Add a new element metadataCreator to itemMeta. This allows us to represent NewsML-G2 items that have had metadata created by a third-party person or system, without having to specify the creator on each metadata property individually.

 

Also, a reminder of an important decision taken for version 2.25 and applying also to version 2.27: the Core Conformance Level will not be developed any further as all recent Change Requests were in fact aiming at features of the Power Conformance Level, changes of the Core Level were only a side effect. The Core Conformance Level specifications of version 2.24 will stay available and valid, find them at http://dev.iptc.org/G2-Standards#CCLspecs 

 

Please share questions regarding NewsML-G2 on this discussion group.

 

Best regards,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn


Group moved to iptc-newsml-g2@groups.io

Brendan Quinn
 

Hello everyone,

 

As part of the overall IPTC migration from Yahoo! Groups to groups.io, we have now moved the public newsml-g2 discussion list.

 

I have closed the Yahoo! Group to new posts but the archive is still available on https://groups.yahoo.com/neo/groups/newsml-g2/conversations/messages

 

The new archive (including migrated messages but not attachments) is at https://groups.io/g/iptc-newsml-g2/topics.

 

Please use iptc-newsml-g2@groups.io for posts to this group from now on.

 

Best regards,

 

Brendan.

--

Brendan Quinn, Managing Director, IPTC - International Press Telecommunications Council

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Phone +44 (0)20 3178 4922 | Email mdirector@...  | Twitter @IPTC / @brendanquinn


NewsML-G2 version 2.27 available

Brendan Quinn
 

Hi all,

the updated version 2.27 of NewsML-G2 is available as Developer Release

  •  XML Schemas and the corresponding documentation are updated

Packages of version 2.27 files can be downloaded:

All changes of version 2.27 can be found on that page: http://dev.iptc.org/G2-Approved-Changes

The NewsML-G2 Implementation Guidelines are a web document now at https://www.iptc.org/std/NewsML-G2/guidelines

 Reminder of an important decision taken for version 2.25 and applying also to version 2.27: the Core Conformance Level will not be developed any further as all recent Change Requests were in fact aiming at features of the Power Conformance Level,  changes of the Core Level were only a side effect.

The Core Conformance Level specifications of version 2.24 will stay available and valid, find them at http://dev.iptc.org/G2-Standards#CCLspecs  

Please share questions regarding NewsML-G2 on this Yahoo group.

 

Best,

Michael

 

 

Michael Steidl

Managing Director of the IPTC [mdirector@...]

International Press Telecommunications Council
Web:
www.iptc.org - on Twitter @IPTC

Business office address:

25 Southampton Buildings, London WC2A 1AL, United Kingdom

Registered in England, company no 1010968

 


Re: xslt with multiple values

John Evans
 

Hi Michael, Paul and Johan

 

Thanks for the responses.

 

The Johan improvement still only returns one value, so I now get

 

<subject qcode="name:gloucestershire county council" />

<subject qcode="section:cheltenham news" />

 

 

I have just tried Michael’s improvement and I can see that I had things in the wrong order.

 

THANKS ALL.

 

 

Paul,

Yes I agree with your comments, and did not fully explain everything.

This is the first part of a coding function that will eventually build a legitimate CV.

I just need to make sure I am capturing the fact that there are three different values of a subject code type identifier, that they happen to call ‘name’.  

I am trying to find out (programmatically) if they do actually have a CV, or if they are just making up keywords.

I am also making use of my software’s ability to automatically search for things it thinks are in a CV, even if the CV is not constructed following correct qcode rules.

 

This is also part of a much larger project that covers a few hundred local newspapers.

 

 

Nice to see you are all still on the ball J

 

John

 

 

 

 

From: newsml-g2@... [mailto:newsml-g2@...]
Sent: 19 March 2018 12:37
To: newsml-g2@...
Subject: Re: [newsml-g2] xslt with multiple values

 

 

This might be a simplified example of course, but I'm not sure if subject/@qcode is a good match for keyword/name, or that 'name' is an appropriate schema alias.

 

'keyword' does exist in the NAR for ad-hoc/folksonomy style tagging.

 

If these are controlled values then subject would be appropriate, and you could use @qcode, but you'll need to URL-encode the values (spaces, amongst other characters, are not valid in qcode values).

 

 

From: newsml-g2@... At: 03/19/18 12:26:08

To: newsml-g2@...
Subject: Re: [newsml-g2] xslt with multiple values

 

Yes, with this

 

           <xsl:value-of select= "concat('name:', article/keywords/name)"/>

 

you're in a for each and the current position does not have that structure so you need to refer to the current item in the loop with a simple .

 

           <xsl:value-of select= "concat('name:', .)"/>

 

 

 

Johan

 

Johan Lindgren, TT, 070-6528007

 

2018-03-19 14:15 GMT+01:00 John Evans john@... [newsml-g2] <newsml-g2@...>:

 

Hi all,

I am taking an xml file and converting it to NewsMLG2 as best I can.

It started life as a json file and I turned it into an xml file that seems to keep all json properties.

 

I am trying to capture as much metadata as possible.

 

A part of the file is

 

<newsItem>

<article>

.....

<keywords><name>education</name></keywords>

<keywords><name>cheltenham</name></keywords>

<keywords><name>gloucestershire county council</name></keywords>

<section>cheltenham news</section>

</article>

</newsItem>

 

 

Within my xslt file I have

 

    <subject >

         <xsl:for-eachselect="article/keywords/name">

           <xsl:attributename="qcode">

           <xsl:value-ofselect= "concat('name:', article/keywords/name)"/>

       </xsl:attribute>

      </xsl:for-each>

    </subject>

 

     <subject >

      <xsl:attributename="qcode">

        <xsl:value-ofselect= "concat('section:',article/section)"/>

      </xsl:attribute>

    </subject>

 

The second bit works fine, the first does not, so I get

<subjectqcode="name:" />

<subjectqcode="section:cheltenham news" />

 

How do I get

 

<subjectqcode="name:education" />

<subjectqcode="name:cheltenhamn" />

<subjectqcode="name:gloucestershire county council" />

<subjectqcode="section:cheltenham news" />

 

Many thanks

 

John Evans

Transtel

 

 

 

 


xslt with multiple values

John Evans
 

Hi all,

I am taking an xml file and converting it to NewsMLG2 as best I can.

It started life as a json file and I turned it into an xml file that seems to keep all json properties.

 

I am trying to capture as much metadata as possible.

 

A part of the file is

 

<newsItem>

<article>

.....

<keywords><name>educationname>keywords>

<keywords><name>cheltenhamname>keywords>

<keywords><name>gloucestershire county councilname></keywords>

<section>cheltenham newssection>

article>

newsItem>

 

 

Within my xslt file I have

 

    <subject >

         <xsl:for-each select="article/keywords/name">

           <xsl:attribute name="qcode">

           <xsl:value-of select= "concat('name:', article/keywords/name)"/>

       xsl:attribute>

      xsl:for-each>

    subject>

 

     <subject >

      <xsl:attribute name="qcode">

        <xsl:value-of select= "concat('section:',article/section)"/>

      xsl:attribute>

    subject>

 

The second bit works fine, the first does not, so I get

<subject qcode="name:" />

<subject qcode="section:cheltenham news" />

 

How do I get

 

<subject qcode="name:education" />

<subject qcode="name:cheltenhamn" />

<subject qcode="name:gloucestershire county council" />

<subject qcode="section:cheltenham news" />

 

Many thanks

 

John Evans

Transtel

 


Re: xslt with multiple values

Brendan Quinn
 

Hi John,

I feel your whole design does not work well.



I’ve created this XSLT:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">

<newsItem>

<xsl:for-each select="//article/keywords">

<subject>

<xsl:attribute name="qcode"><xsl:value-of select="concat('name:', ./name)"/></xsl:attribute>

</subject>

</xsl:for-each>

<subject>

<xsl:attribute name="qcode"><xsl:value-of select="concat('section:',//article/section)"/></xsl:attribute>

</subject>

</newsItem>

</xsl:template>

</xsl:stylesheet>



And it delivers:

<?xml version="1.0" encoding="UTF-8"?>

<newsItem>

<subject qcode="name:education"/>

<subject qcode="name:cheltenham"/>

<subject qcode="name:gloucestershire county council"/>

<subject qcode="section:cheltenham news"/>

</newsItem>



The issues are:

* Using a foreach requires to put the created element inside it, not setting is as a wrapper
* As Johan already showed: inside a foreach the selected node is the “.” node – and you should refer to it
* Aside: “name:gloucestershire county council” is invalid as it includes spaces, must be encoded to %20



Best,

Michael



From: newsml-g2@yahoogroups.com <newsml-g2@yahoogroups.com>
Sent: Monday, March 19, 2018 1:26 PM
To: newsml-g2@yahoogroups.com
Subject: Re: [newsml-g2] xslt with multiple values








Yes, with this



<xsl:value-of select= "concat('name:', article/keywords/name)"/>



you're in a for each and the current position does not have that structure so you need to refer to the current item in the loop with a simple .



<xsl:value-of select= "concat('name:', .)"/>








Johan



Johan Lindgren, TT, 070-6528007



2018-03-19 14:15 GMT+01:00 John Evans john@transtel.com <mailto:john@transtel.com> [newsml-g2] <newsml-g2@yahoogroups.com <mailto:newsml-g2@yahoogroups.com> >:



Hi all,

I am taking an xml file and converting it to NewsMLG2 as best I can.

It started life as a json file and I turned it into an xml file that seems to keep all json properties.



I am trying to capture as much metadata as possible.



A part of the file is



<newsItem>

<article>

.....

<keywords><name>education</name></keywords>

<keywords><name>cheltenham</name></keywords>

<keywords><name>gloucestershire county council</name></keywords>

<section>cheltenham news</section>

</article>

</newsItem>





Within my xslt file I have



<subject >

<xsl:for-each select="article/keywords/name">

<xsl:attribute name="qcode">

<xsl:value-of select= "concat('name:', article/keywords/name)"/>

</xsl:attribute>

</xsl:for-each>

</subject>



<subject >

<xsl:attribute name="qcode">

<xsl:value-of select= "concat('section:',article/section)"/>

</xsl:attribute>

</subject>



The second bit works fine, the first does not, so I get

<subject qcode="name:" />

<subject qcode="section:cheltenham news" />



How do I get



<subject qcode="name:education" />

<subject qcode="name:cheltenhamn" />

<subject qcode="name:gloucestershire county council" />

<subject qcode="section:cheltenham news" />



Many thanks



John Evans

Transtel


Re: xslt with multiple values

Paul Harman (BLOOMBERG/ LONDON)
 


Re: xslt with multiple values

Johan Lindgren
 

Yes, with this

           <xsl:value-of select= "concat('name:', article/keywords/name)"/>

you're in a for each and the current position does not have that structure so you need to refer to the current item in the loop with a simple .

           <xsl:value-of select= "concat('name:', .)"/>



Johan

Johan Lindgren, TT, 070-6528007

2018-03-19 14:15 GMT+01:00 John Evans john@... [newsml-g2] <newsml-g2@...>:



Hi all,

I am taking an xml file and converting it to NewsMLG2 as best I can.

It started life as a json file and I turned it into an xml file that seems to keep all json properties.

 

I am trying to capture as much metadata as possible.

 

A part of the file is

 

<newsItem>

<article>

.....

<keywords><name>educationname>keywords>

<keywords><name>cheltenhamname>keywords>

<keywords><name>gloucestershire county councilname>keywords>

<section>cheltenham newssection>

article>

newsItem>

 

 

Within my xslt file I have

 

    <subject >

         <xsl:for-each select="article/keywords/name">

           <xsl:attribute name="qcode">

           <xsl:value-of select= "concat('name:', article/keywords/name)"/>

       xsl:attribute>

      xsl:for-each>

    subject>

 

     <subject >

      <xsl:attribute name="qcode">

        <xsl:value-of select= "concat('section:',article/section)"/>

      xsl:attribute>

    subject>

 

The second bit works fine, the first does not, so I get

<subject qcode="name:" />

<subject qcode="section:cheltenham news" />

 

How do I get

 

<subject qcode="name:education" />

<subject qcode="name:cheltenhamn" />

<subject qcode="name:gloucestershire county council" />

<subject qcode="section:cheltenham news" />

 

Many thanks

 

John Evans

Transtel

 





Re: GUIDs

John Evans
 

The guid+version combination must be unique for any NewsMLG2 item. The fact that several happen to be listed in a newsMessage is not relevant.  The newsMessage is just a container and does not have any reference to the contents.

Imagine the newsMessage is an envelope with contents inside. You can open the envelope, throw it away,  and the contents should all be able to stand individually as whatever xxxitems they are.

 

Hope this helps.

 

John Evans

Managing Director

Transtel Communications ltd

www.Transtel.com

 

From: newsml-g2@... [mailto:newsml-g2@...]
Sent: 14 February 2018 16:29
To: newsml-g2@...
Subject: [newsml-g2] GUIDs

 

 

Hi All 

 

Can Guids in items such as a packageItem or a planningItem (e.g while in the same newsMessage) be the same or do they have to be different?

 

Thanks

Abdul 

 


GUIDs

Abdul Hakim
 

Hi All 


Can Guids in items such as a packageItem or a planningItem (e.g while in the same newsMessage) be the same or do they have to be different?


Thanks

Abdul 


21 - 40 of 1662