I generate a sitemap image file which looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://mywebsite.com/en/VISION-ART/image/boy-with-pipe-pablo-picasso</loc>
<image:image>
<image:loc>https://mywebsite.com/include/php/render/framed/VR/1/image/VndpwKicqcA%3D/ver//frame/gold-bronze-b88-1/borderSize/0.90/mat/fa3caad76c/matSize/6/matSizePercent/12/maxSize/500/minSize/400/le-garcon-a-la-pipe-pablo-picasso.jpg</image:loc>
<image:title>Boy with pipe - PABLO PICASSO</image:title>
<image:caption>Boy with pipe - PABLO PICASSO, art photography of VISION D'ART. , smokehouse, pipe, boy, worker, blue work, painting, smoke, PABLO PICASSO</image:caption>
</image:image>
</url>
<url>
<loc>https://mywebsite.com/en/VISION-ART/image/the-dream-pablo-picasso</loc>
<image:image>
<image:loc>https://mywebsite.com/include/php/render/framed/VR/1/image/VndowKicqcA%3D/ver//frame/gold-bronze-b88-1/borderSize/0.90/mat/26ecae929f/matSize/6/matSizePercent/12/maxSize/500/minSize/400/le-reve-pablo-picasso.jpg</image:loc>
<image:title>The dream - PABLO PICASSO</image:title>
<image:caption>The dream - PABLO PICASSO, art photography of VISION D'ART. , sleep, dream, PABLO PICASSO, oil painting, painting, drawing, abstract, woman</image:caption>
</image:image>
</url>
...
</urlset>
Can I generate others sitemap image for others language.
For, the same image page, <loc></loc> will be different, for example, for french version :
https://mywebsite.com/en/VISION-ART/image/the-dream-pablo-picasso
>>>
https://mywebsite.com/fr/VISION-ART/image/le-reve-pablo-picasso
And of course, title and caption will be different as well.
But <image:loc></image:loc> will remain the same.
So, can I generate one sitemap image per language ? And how to tell google for which language the sitemap image is for?
Related
im trying to create a sitemap via velocity template in dotcms
this is my code
#set($articles = $json.fetch('https://xxxxx.xxxx.xxx/api/content/render/false/type/json/query/+contentType:YmArticlePage%20+(conhost:b5d82078-a844-4104-9664-4348c2420bba%20conhost:SYSTEM_HOST)%20+(wfscheme:d61a59e1-a49c-46f2-a929-db2b4bfa88b2*)%20+(wfstep:dc3c9cd0-8467-404b-bf95-cb7df3fbc293*)%20/limit/1/orderby/score,modDate%20desc'))
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
#foreach($article in $articles.contentlets)
<url>
<loc>$!{host}$!{article.path}</loc>
<changefreq>always</changefreq>
<priority>0.6</priority>
<lastmod>$date.format('medium', $article.modDate) $article.modDate</lastmod>
</url>
#end
</urlset>
i am able to render the $article.modDate, but if i am to format it using dateViewtool it doesnt seem to format it and just display the string "$date.format('medium', $article.modDate)" when viewed in the browser.
see screenshot below.
the dotcms content type api is throwing the dates as string. So i have to convert them first into dates and then i can do the formatting
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
#foreach($article in $articles.contentlets)
#set($md = $date.toDate("yyyy-MM-dd HH:mm:ss",$article.modDate))
<url>
<loc>$!{host}$!{article.path}</loc>
<changefreq>always</changefreq>
<priority>0.6</priority>
<lastmod>$date.format("dd MMM yyyy HH:mm:ss", $md)</lastmod>
</url>
#end
</urlset>
this works for me
We are attempting to build an API to play audiobooks on Sonos and we have run into the issue that seeking through tracks seems to be specifically disabled for audiobook type containers. We noticed this issue when we set the container type to 'container' and found that not only was seeking around the track possible, but so was "Quick Skips," which are only supposed to be possible for audiobooks and podcasts (https://developer.sonos.com/build/content-service-get-started/supported-audio-content/).
Here is what playback looks like when the container type for our chapter tracks is set to 'audiobook' and here's what it looks like when the container type is set to 'container.' Why are we running into this issue and is there any way to allow for seeking and quick skips within a track for tracks within an audiobook container?
Here are example getMetadata responses from our service.
Root:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<getMetadataResponse xmlns="http://www.sonos.com/Services/1.1">
<getMetadataResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<index>0</index>
<count>1</count>
<total>1</total>
<mediaCollection>
<id>audiobook:33462:2617184</id>
<itemType>container</itemType>
<title>The Grapes of Wrath</title>
<summary>First published in 1939, The Grapes of Wrath creates an unforgettable portrait of the migrants who left the dust bowl for the promised land of California. Although he wrote it quickly, Steinbeck spent much time gathering detailed reports of the desperate conditions in migrant camps. He also worked in one camp helping to care for its starving residents. Although they have planted the land for generations, the Joads are tenant farmers. Now drought and mechanization have forced them off the Oklahoma farm they call home. As they travel toward new jobs in California, the penniless, hungry Joads learn that America has no mercy for the poor. Their fate is one that was repeated in hundreds of lives. Brilliant in its fusion of drama and rhetoric, The Grapes of Wrath changed the way the world saw migrant workers. They would never again be faceless masses who could be ignored and abandoned. This landmark work's impact earned John Steinbeck the Pulitzer Prize and contributed...</summary>
<author>John Steinbeck</author>
<narrator>Dylan Baker</narrator>
<canPlay>true</canPlay>
<albumArtURI>https://img1.od-cdn.com/ImageType-150/1694-1/5CE/FF2/0E/{5CEFF20E-0C05-4FA1-8903-34D26124FC29}Img150.jpg</albumArtURI>
<canResume>true</canResume>
</mediaCollection>
</getMetadataResult>
</getMetadataResponse>
</s:Body>
</s:Envelope>
Title:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<getMetadataResponse xmlns="http://www.sonos.com/Services/1.1">
<getMetadataResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<index>0</index>
<count>20</count>
<total>20</total>
<mediaMetadata>
<id>navEl:33462:2617184:0:0</id>
<itemType>track</itemType>
<title>The Grapes of Wrath [0/20]</title>
<mimeType>audio/mpeg</mimeType>
<trackMetadata>
<author>John Steinbeck</author>
<narrator>Dylan Baker</narrator>
<albumArtURI>https://....Img150.jpg</albumArtURI>
<canPlay>true</canPlay>
<canAddToFavorites>false</canAddToFavorites>
</trackMetadata>
</mediaMetadata>
<mediaMetadata>
<id>navEl:33462:2617184:1:0</id>
<itemType>track</itemType>
<title>The Grapes of Wrath [1/20]</title>
<mimeType>audio/mpeg</mimeType>
<trackMetadata>
<author>John Steinbeck</author>
<narrator>Dylan Baker</narrator>
<albumArtURI>https://img1.od-cdn.com/ImageType-150/1694-1/5CE/FF2/0E/{5CEFF20E-0C05-4FA1-8903-34D26124FC29}Img150.jpg</albumArtURI>
<canPlay>true</canPlay>
<canAddToFavorites>false</canAddToFavorites>
</trackMetadata>
</mediaMetadata>
<mediaMetadata>
<id>navEl:33462:2617184:2:0</id>
<itemType>track</itemType>
<title>The Grapes of Wrath [2/20]</title>
<mimeType>audio/mpeg</mimeType>
<trackMetadata>
<author>John Steinbeck</author>
<narrator>Dylan Baker</narrator>
<albumArtURI>https://.....Img150.jpg</albumArtURI>
<canPlay>true</canPlay>
<canAddToFavorites>false</canAddToFavorites>
</trackMetadata>
</mediaMetadata>
<!--More MediaMetadata Elements-->
</getMetadataResult>
</getMetadataResponse>
</s:Body>
</s:Envelope>
Are there any additional parameters that we have to include to make seeking work for audiobooks?
It looks like you're missing the duration element in trackMetadata. The fact that the Quick Skip buttons show up for the generic container itemType is unintended.
The Sonos app shows Quick Skips for audiobooks whenever the metadata contains an author, narrator, or chapter title, provided that you:
Specify audioBook as the itemType.
Include duration in trackMetadata for each chapter.
See Saving and Resuming Play Position
for details.
How can I test / validate my Googlenews sitemap?
If I go to the search console I have an option to add/test sitemap. However it saying I have an invalid XML tag:
Parent tag: publication
Tag: keywords
But I can see this tag is valid so I think the validator is testing it as a normal sitemap not a googlenews specific one:
https://support.google.com/news/publisher/answer/74288?hl=en#submitsitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<url>
<loc>
http://www.website.com/page
</loc>
<news:news>
<news:publication>
<news:name>Sitename/news:name>
<news:language>en</news:language>
<news:keywords>Shopping</news:keywords>
</news:publication>
<news:title>Page title here</news:title>
<news:publication_date>2015-11-12T14:16:31+00:00</news:publication_date>
</news:news>
</url>
<url>
<loc>
http://www.website.com/other-page
</loc>
<news:news>
<news:publication>
<news:name>Sitename</news:name>
<news:language>en</news:language>
<news:keywords>Shopping</news:keywords>
</news:publication>
<news:title>
Page 2 title here
</news:title>
<news:publication_date>2015-11-12T12:52:03+00:00</news:publication_date>
</news:news>
</url>
<url>
If I go to the news tools homepage in google its telling me that the site is included in Google News. But how can I check that my sitemap is working correctly?
From Google itself: Validating a News Sitemap
The following XML schemas define the elements and attributes that can appear in a News Sitemap file. A News Sitemap can contain both News-specific elements and core Sitemap elements. You can download the schemas from the links below:
For News-specific elements: http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd.
For core Sitemap elements: http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
There are a number of tools available to help you validate the structure of your Sitemap based on these schemas. You can find a list of XML-related tools at each of the following locations:
http://www.w3.org/XML/Schema#Tools
http://www.xml.com/pub/a/2000/12/13/schematools.html
In order to validate your News Sitemap file against a schema, the XML file will need additional headers as shown below:
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
http://www.google.com/schemas/sitemap-news/0.9
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd">
<url>
...
</url>
</urlset>
The tag is valid but was in the wrong place in the XML structure.
<url>
<loc>
http://www.website.com/page
</loc>
<news:news>
<news:publication>
<news:name>Sitename/news:name>
<news:language>en</news:language>
</news:publication>
<news:title>Page title here</news:title>
<news:publication_date>2015-11-12T14:16:31+00:00</news:publication_date>
<news:keywords>Shopping</news:keywords>
</news:news>
</url>
I am trying to create an interface for WOLF (Wordnet Libre du Français, Free French Wordnet). The goal is to replicate the AWNDatabaseManger for the Arabic Wordnet (http://www.talp.upc.edu/index.php/technology/resources/multilingual-lexicons-and-machine-translation-resources/multilingual-lexicons/72-awn), but for WOLF.
The problem I am facing is that I cannot find proper data specifications for WOLF (http://alpage.inria.fr/~sagot/wolf-en.html) or WoNeF (which is another French tranlated Wordnet http://wonef.fr/)
For the Arabic Wordnet they have given detailed Data Specifications which can be found at http://globalwordnet.org/arabic-wordnet/awn-data-spec/
I am trying to find the same for either WOLF or WoNeF.
Otherwise how do i map the two files?
For example an word and its relation in awn look like:
<item itemid="$ajarap_AlS~amog_n1AR" offset="111586059" lexfile="" name="شَجَرَة الصَّمْغ " type="synset" headword="" POS="n" source="" gloss="" authorshipid="80" />
<word wordid="$ajarap__1" value="شَجَرَة الصَّمْغ " synsetid="$ajarap_AlS~amog_n1AR" frequency="" corpus="" authorshipid="11461" />
<link type="has_hyponym" link1="$ajarap_AlS~amog_n1AR" link2=">ukAlibotws_n1AR" authorshipid="35038" />
<link type="has_hyponym" link1="$ajarap_n1AR" link2="$ajarap_AlS~amog_n1AR" authorshipid="35041" />
The word defintion (item) and it's relations (link) are seperated with different attributes.
whereas in WOLF a word and it's relations look like:
<SYNSET>
<ILR type="near_antonym">eng-30-00002098-a</ILR>
<ILR type="be_in_state">eng-30-05200169-n</ILR>
<ILR type="be_in_state">eng-30-05616246-n</ILR>
<ILR type="eng_derivative">eng-30-05200169-n</ILR>
<ILR type="eng_derivative">eng-30-05616246-n</ILR>
<ID>eng-30-00001740-a</ID>
<SYNONYM>
<LITERAL lnote="2/2:fr.csbgen,fr.csen">comptable</LITERAL>
</SYNONYM>
<DEF>(usually followed by `to') having the necessary means or skill or know-how or authority to do something
</DEF>
<USAGE>able to swim</USAGE>
<USAGE>she was able to program her computer</USAGE>
<USAGE>we were at last able to buy a car</USAGE>
<USAGE>able to get a grant for the project</USAGE>
<BCS>3</BCS>
<POS>a</POS>
</SYNSET>
I can make assumptions that awn attribute gloss is equal to wolf tag usage, and awn attribute pos is equal to wolf tag pos.
But the point is I don't want to make assumptions, i am looking for proper documentation from which I can be sure and conclude the mappings between the two files.
Could anyone please point me to the right docs?
Depending on your needs, a workaround could be to use the NLTK Python library which integrates some French synsets coming probably from WOLF
>>> from nltk.corpus import wordnet as wn
>>> [synset.lemma_names('fra') for synset in wn.synsets(u'chien'.decode('utf-8'), lang='fra')]
[[u'canis_familiaris', u'chien'], [u'aboyeur', u'chien', u'chienchien', u'clébard', u'toutou'], [u'chien', u'chien_de_chasse'], [u'chien'], [u'chien', u'clic', u'cliquer', u'cliquet'], [u'chien', u'franc', u'hot-dog'], [u'achille', u'chien', u'quignon', u'talon'], [u'chien'], [u'chien']]
The WOLF database is formatted based on VisDic defined here:
https://nlp.fi.muni.cz/trac/deb2/wiki/WordNetFormat
The XSD is available here: http://deb.fi.muni.cz/debvisdic.xsd
I like to have one docbook xml document that has content for several target audiences. Is there a filter that enables me to filter out the stuff only needed for "advanced" users?
The level attribute is invented by me to express what I have in mind.
<?xml version="1.0"?>
<book>
<title lang="en">Documentation</title>
<chapter id="introduction" level="advanced">
<title>Introduction for advanced users</title>
</chapter>
<chapter id="introduction" level="basic">
<title>Introduction for basic users</title>
</chapter>
<chapter id="ch1">
<para level="basic">Just press the button</para>
<para level="advanced">
Go to preferences to set your
needs and then start the process
by pressing the button.
</para>
</chapter>
</book>
DocBook does not have a level attribute. Perhaps you meant userlevel?
If you are using the DocBook XSL stylesheets to transform your documents, they have built-in support for profiling (conditional text). To use it you need to
use the profiling-enabled version of the stylesheet (e.g. use html/profile-docbook.xsl instead of the usual html/docbook.xsl), and
specify the attribute values you want to profile on via a parameter (e.g. set profile.userlevel to basic).
Chapter 26 of Bob Stayton's DocBook XSL: The Complete Guide has all the details.
Two ways, off the top of my head:
Write a quick script that takes the level as a parameter and, using XPath or regular expressions, that only spits out the XML you want.
Write an XSLT transformation that will spit out the XML you want.
(2) is cleaner, but (1) is probably faster to write up.