I'm updating an XSLT, that spits out meta tags for a website. I'd like to add the new Twitter Cards and OpenGraph tags into this, as it's a nice idea :-) The problem is, I get a parsing error whenever I try and save.
I'd hoped, it would be a simple case of adding the correct name spaces, but sadly not!
Any ideas? Surely someones done this before :-)
Laurence
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:umb="urn:umbraco.library"
exclude-result-prefixes="umb"
>
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<!-- Meta, Laurie 5th September 2011 -->
<xsl:template match="/">
<!-- Title -->
<!-- normal meta removed -->
What does the error message say if you add the ?umbdebugshowtrace=1 querystring or look in the /app_data/logs file, depending on the version of Umbraco you're running?
That error strikes me as weird - can you post the complete XSLT as a Gist maybe? It's very likely a namespace error - but it sounds like there's a misplaced meta element somewhere...
Meta Tags -> OpenGraph and Twitter Errors
Hej!
I'm updating an XSLT, that spits out meta tags for a website. I'd like to add the new Twitter Cards and OpenGraph tags into this, as it's a nice idea :-) The problem is, I get a parsing error whenever I try and save.
I'd hoped, it would be a simple case of adding the correct name spaces, but sadly not!
Any ideas? Surely someones done this before :-)
Laurence
Hi Laurence
What does the error message say if you add the ?umbdebugshowtrace=1 querystring or look in the /app_data/logs file, depending on the version of Umbraco you're running?
At a first glance the above looks allright to me.
/Jan
Hey Jan! The parsing error from the XSLT processor in Umbraco is:
System.Xml.Xsl.XslLoadException: Top-level element 'meta' may not have a null namespace URI. An error occurred at (36,3).
Hey Laurence,
That error strikes me as weird - can you post the complete XSLT as a Gist maybe? It's very likely a namespace error - but it sounds like there's a misplaced
meta
element somewhere.../Chriztian
Here we go :-)
https://gist.github.com/anonymous/c31297d8b91d4bdd9c79
Ah - thought so :)
You're meta tags section is placed directly as children of the xsl:stylesheet tag - you must put them inside a template.
And I know you know that :)
/Chriztian
Doh! Of course...one can be so blind sometimes :D
/Jan
Gah! >.< That had me stumped! I love the internet! I could of been stuck on that for days, months, years even! ;-)
is working on a reply...