Hello Raghavendran. Sorry to hear you are having problems. But this is due to the XML schema changing in the new version of Umbraco in version 4.5 and newer.
Also it's possible to have your site running 4.5.X of Umbraco to use the old XML schema by doing the following: You need to
update the UseLegacyXmlSchema setting in the config/UmbracoSettings.config file
OK if you wish to use the OLD XML schema and have changed the setting. You will need to publish all nodes again. So right click on your first node and select publish and select the option to include all child nodes as well. After doing that then right click on the very top node called "Content" and select republish entire site. This will fix your problem with saving XSLT files.
Well if you want to use the new XML schema and adapt your code to do this, then I will need to see a copy of it in order to help you.
hi warren i did change it to true and published....xslt got saved but i didnt get any output in the page......... im planning to use the new schema only for my project....so if some one knows about it please help me...
Hello Raghavendran. I did post some WIKI links about the new XML Schema further up, so please read those first and then post more specific questions to get help, as opposed to more generic questions.
OK so if you saved and published and are using the OLD XML schema and did not get any output on the page, it may be that your XSLT is wrong.
Please show me the actual code from the file, as it's impossible to help you.
hi warren,for this code i have another document tab for mediaAcceleration_zh,powerEfficiency_zh etc.....so i need to fetch according to query string...that is possible if i get the node based on alias....( i would be albe to concatenate my alias name with query ) and view data...
Hello Raghavendran. OK so your XSLT file is using the NEW XML Schema and not the OLD schema so you will need to switch the config setting back and publish/re-publish again to make sure the XML cache file is using the new schema.
I am not 100% sure I follow what you want to do, but here is my example code of what I understand you want to do.
<!-- Do different stuff depending on querystring --> <xsl:choose> <xsl:when test="$documentTypeAlias = 'mediaAcceleration_zh'> <!-- Do stuff when mediaAcceleration_zh --> </xsl:when> <xsl:when test="$documentTypeAlias = 'powerEfficiency_zh'> <!-- Do stuff when powerEfficiency_zh --> </xsl:when> <xsl:otherwise> <!-- When we dont meet the previous two tests, do this --> <xsl:otherwise> </xsl:choose>
i have 2 parts...media acceleration and media accleration_zh in tabs in one document type...
Similarly for power efficiency i have 2(normal and _zh)
Similarly for Graphics technology i have 2...
i dont want to test every time if the query is _zh or no query...i directly try to concat the _zh or nothing from the query string to the alias name and get the doccumenttypeAlias....
<xsl:choose> <xsl:whentest="$documentTypeAlias = 'mediaAcceleration'> <!-- Do stuff when mediaAcceleration -->
<!-- Value of mediaAcceleration --> <xsl:value-of select="$currentPage/mediaAcceleration" disable-output-escaping="yes"/>
<!-- Value of mediaAcceleration_zh --> <xsl:value-of select="$currentPage/* [name() = concat('mediaAcceleration',$documentTypeAlias) and not(@isDoc)]" />
this is my code in xslt
<xsl:value-of select="$currentPage/data[@alias=string(mediaAcceleration)]" disable-output-escaping="yes"/>
Here if i give $currentPage/mediaAcceleration its working but if i give $currentPage/data[@alias='mediaAcceleration'] ..its not working..
i need to use @alias because i will be using language translation where we need to concatenate the alias sometimes with the query string...
PPlease help..im fed up with this!! :(
Hello Raghavendran.
Sorry to hear you are having problems. But this is due to the XML schema changing in the new version of Umbraco in version 4.5 and newer.
Here is a WIKI post about the new schema
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/xslt-examples-updated-to-new-schema
Also it's possible to have your site running 4.5.X of Umbraco to use the old XML schema by doing the following:
You need to update the UseLegacyXmlSchema setting in the config/UmbracoSettings.config file
Warren :)
hi warren,
once i change the useLegacyXmlSchema Value to True...The xslt file is not getting saved...
[xsltErrorNoNodesPublished]
This error is coming....What to do?
And Also i wanna use the new Xml Schema itself.....so may i know how i need to manipulate my code to make it work according to the new schema
Hello Raghavendran.
OK if you wish to use the OLD XML schema and have changed the setting. You will need to publish all nodes again.
So right click on your first node and select publish and select the option to include all child nodes as well.
After doing that then right click on the very top node called "Content" and select republish entire site.
This will fix your problem with saving XSLT files.
Well if you want to use the new XML schema and adapt your code to do this, then I will need to see a copy of it in order to help you.
Warren :)
hi warren i did change it to true and published....xslt got saved but i didnt get any output in the page......... im planning to use the new schema only for my project....so if some one knows about it please help me...
@warren:thanks a lot for ur quick replies...
Hello Raghavendran.
I did post some WIKI links about the new XML Schema further up, so please read those first and then post more specific questions to get help, as opposed to more generic questions.
OK so if you saved and published and are using the OLD XML schema and did not get any output on the page, it may be that your XSLT is wrong.
Please show me the actual code from the file, as it's impossible to help you.
Warren :)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:umbraco.contour="urn:umbraco.contour"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:include href="../xslt/lang_lib.xslt" />
<xsl:template match="/">
<!-- The fun starts here -->
<table align="center" border="0">
<tr><td style="width:850px"> <xsl:value-of select="$currentPage/technologyListPageBanner" disable-output-escaping="yes"/>
</td></tr>
</table>
<table width="850px" border="0" align="center" style="background:WHITESMOKE">
<tr>
<td style="width:850px">
<xsl:value-of select="$currentPage/technologyListPageHeader" disable-output-escaping="yes"/>
</td></tr>
</table>
<!-- table technologies -->
<table align="center" style="width:850px; background:WHITESMOKE">
<tr>
<td class="border1">
<xsl:value-of select="$currentPage/Multi-coreTechnology" disable-output-escaping="yes"/>
</td>
<td class="border1">
<xsl:value-of select="$currentPage/GraphicsTechnology" disable-output-escaping="yes"/>
</td>
</tr>
<tr>
<td class="border1">
<xsl:value-of select="$currentPage/manageability" disable-output-escaping="yes"/>
</td>
<td class="border1">
<xsl:value-of select="$currentPage/mediaAcceleration" disable-output-escaping="yes"/>
</td>
</tr>
<tr>
<td class="border1">
<xsl:value-of select="$currentPage/powerEfficiency" disable-output-escaping="yes"/>
</td>
<td>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
hi warren,for this code i have another document tab for mediaAcceleration_zh,powerEfficiency_zh etc.....so i need to fetch according to query string...that is possible if i get the node based on alias....( i would be albe to concatenate my alias name with query ) and view data...
Hello Raghavendran.
OK so your XSLT file is using the NEW XML Schema and not the OLD schema so you will need to switch the config setting back and publish/re-publish again to make sure the XML cache file is using the new schema.
I am not 100% sure I follow what you want to do, but here is my example code of what I understand you want to do.
Warren :)
OK I think I understand a bit better now.
Awesome Warren...
Thanks a lot :)..it worked :)....U rock :)
Don't forget to mark the correct reply as the solution, in order for other people to find the answer easily.
Warren :)
is working on a reply...