We have the following architecture for our website where we have a tld and we have separate stores using directories for non-us pricing and shipping based on regions. Each regional site basically has the exact same pages as the us site.
www.xyz.com - tld
www.xyz.com/zyx - english/us pricing
www.xyz.com/zyx_ca - english/canadian pricing
www.xyz.com/zyx_eu - english/eu pricing
...
To start with we used these settings for the custom alternative language pages (note the extra forward slash that is required with the wildcard...not sure why but this is what was needed)
https://www.xyx.com/zyx//*
en-CA https://www.xyx.com/zyx_ca/
This produced results like the following in the sitemap.xml
<url>
<loc>https://www.xyz.com/zyx/products_category_all</loc>
<xhtml:link rel="alternate" hreflang="en-CA" href="https://www.xyz.com/zyx_ca/products_category_all" />
</url>
...
<url>
<loc>https://www.xyz.com/zyx_ca/products_category_all</loc>
</url>
If the custom alternative language pages are updated to what's below you also get the xhtml link for the _ca page as well
https://www.xyz.com/zyx//*
en-CA https://www.xyz.com/zyx_ca/
https://www.xyz.com/zyx_ca//*
en https://www.xyz.com/zyx/
However, according to google each link has to have all the other links so the end result needs to be the what is shown below. Is this possible with the current version? Also can you explain the need for the extra / in specifying the wildcard url.
<url>
<loc>https://www.xyz.com/zyx/products_category_all</loc>
<xhtml:link rel="alternate" hreflang="en-CA" href="https://www.xyz.com/zyx_ca/products_category_all" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.xyz.com/zyx/products_category_all" />
</url>
...
<url>
<loc>https://www.xyz.com/zyx_ca/products_category_all</loc>
<xhtml:link rel="alternate" hreflang="en-CA" href="https://www.xyz.com/zyx_ca/products_category_all" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.xyz.com/zyx/products_category_all" />
</url>