Created
November 21, 2016 16:42
-
-
Save stnadmin/0d1b885f4fce770226915858589aa6ba to your computer and use it in GitHub Desktop.
This is used in the process of converting an ONIX XML file to a CSV file that we can digest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"row-selector": "/ONIXmessage/product", | |
"columns": { | |
"product_sku": "concat('ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244)", | |
"mfg_product_sku": "productidentifier/b221[contains(., '03')]/following-sibling::b244", | |
"brand_id": "publisher/b081", | |
"product_s_desc": "concat(title/b203,' by ',contributor/b035[contains(., 'A01')]/following-sibling::b036, ' and published by ', publisher/b081)", | |
"product_desc": "othertext/d102[contains(., '1')]/following-sibling::d104", | |
"product_thumb_image": "concat('http://stoysnetcdn.com/ingr/ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244, '/ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244, '.jpg')", | |
"product_full_image": "concat('http://stoysnetcdn.com/ingr/ingr', productidentifier/b221[contains(., '03')]/following-sibling::b244, '/')", | |
"image_source": "mediafile/f114[contains(., '04')]/following-sibling::f117", | |
"product_available": "supplydetail/j396", | |
"product_weight": "measure/c093[contains(., '08')]/following-sibling::c094", | |
"product_length": "measure/c093[contains(., '03')]/following-sibling::c094", | |
"product_width": "measure/c093[contains(., '02')]/following-sibling::c094", | |
"product_height": "measure/c093[contains(., '01')]/following-sibling::c094", | |
"product_lwh_uom": "measure/c093[contains(., '01')]/following-sibling::c095", | |
"product_name": "title/b203", | |
"product_price": "supplydetail/price/j151", | |
"product_age": "concat(audiencerange/b074[contains(., '18')]/following-sibling::b075[contains(., '03')]/following-sibling::b076,' to ',audiencerange/b074[contains(., '18')]/following-sibling::b075[contains(., '04')]/following-sibling::b076)", | |
"product_grade": "concat(audiencerange/b074[contains(., '11')]/following-sibling::b075[contains(., '03')]/following-sibling::b076,' to ',audiencerange/b074[contains(., '11')]/following-sibling::b075[contains(., '04')]/following-sibling::b076)", | |
"category_id": "4", | |
"product_upc": "productidentifier/b221[contains(., '04')]/following-sibling::b244", | |
"product_isbn": "productidentifier/b221[contains(., '02')]/following-sibling::b244", | |
"product_ean": "productidentifier/b221[contains(., '03')]/following-sibling::b244", | |
"mfg_id": "'ingr'", | |
"product_release_date": "b003", | |
"author": "contributor/b035[contains(., 'A01')]/following-sibling::b036", | |
"pages": "b061", | |
"year_published": "b003", | |
"author_bio": "othertext/d102[contains(., '13')]/following-sibling::d104", | |
"illustrator": "contributor/b035[contains(., 'A12')]/following-sibling::b036" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment