Join the Webstudio community

Updated 2 months ago

Colon is ignored when using "xhtml:link" in the xml node sitemap

At a glance
Colon is ignored when using "xhtml:link" in the XML Node sitemap.

I'm working on a multilingual site, and when I try to add the "xhtml:link" with the XML node, the colon gets ignored. I tried different string concatenation solutions, but none worked. I have the same issue with comments "<!-- -- >".

Is it a bug? Is there any solution to add a tag with a colon with the XML node?
Attachment
image.png
M
O
I
9 comments
Hi. I’m experiencing the same issue with "xhtml:link" in the XML Node of my sitemap for a multilingual site. The colon gets ignored when trying to add xhtml:link, and I haven’t found a workaround that keeps the colon intact. Is there any update or solution for this?
indeed, its a bug
Can you describe the use case please?
Seems like sitemap schema can be extended with any custom namespaces.
Actually, even though the : (in my case, for xhtml:link) doesn’t appear in Webstudio’s editor, it is correctly included in the generated XML file.
I’m creating a sitemap for a multilingual site and was hoping to generate it with a reference URL and its alternate versions, like this:
<url> <loc>https://fpa-france-ebrei.wstd.io/contact</loc> <xhtml:link rel="alternate" hreflang="fr" href="https://fpa-france-ebrei.wstd.io/contact"/> <xhtml:link rel="alternate" hreflang="en" href="https://fpa-france-ebrei.wstd.io/en/contact"/> <xhtml:link rel="alternate" hreflang="x-default" href="https://fpa-france-ebrei.wstd.io/contact"/> </url>
And Webstudio currently doesn’t support self-closing tags in XML if Text Content is empty.
Fixes, will be released soon
https://github.com/webstudio-is/webstudio/issues/4343

We are not supporting self-closing tags at this time (the plan is to eventually switch XML to a standard text editor; the current solution is a workaround). However, this is not a bug or issue, as <tag /> and <tag></tag> are functionally the same.
Add a reply
Sign up and join the conversation on Discord