Example conditional stuff

Andy,

Take Dan’s example from 

  http://lists.w3.org/Archives/Public/public-csv-wg/2014May/0152.html

where the CSV looks like:

O*NET-SOC 2010 Code,O*NET-SOC 2010 Title
11-1011.00         ,Chief Executives
11-1011.03         ,Chief Sustainability Officers
11-1021.00         ,General and Operations Managers
11-1031.00         ,Legislators
11-2011.00         ,Advertising and Promotions Managers
11-2011.01         ,Green Marketers
11-2021.00         ,Marketing Managers
11-2022.00         ,Sales Managers
11-2031.00         ,Public Relations and Fundraising Managers

The codes are structured so ideally the structure would look something like:

soc:11-1011.00
  rdfs:label “Chief Executives” ;
  skos:notation “11-1011.00” ;
  .

soc:11-1011.03
  rdfs:label “Chief Sustainability Officers” ;
  skos:notation “11-1011.03” ;
  skos:broader soc:11-1011.00 ;
  .

To get this, what you’d want in a template is to be able to say:

  IF the code ends with something other than ’00'
  THEN
     add a skos:broader property
     whose value is first 8 characters + ’00'

That’s the kind of thing I’m talking about in terms of having conditional statements and needing to have functions that operate over the values.

Jeni
--  
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 4 June 2014 13:19:42 UTC