I get an error when I write in my xslt file
Hi
This is the error I get:
System.Xml.XmlException: Reference to undeclared entity 'nbsp'. Line 83, position 39.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String
name, Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver,
Int32 entityStartLinePos)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean
isInAttributeValue, EntityExpandType expandType, Int32&
charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Xsl.Xslt.XsltInput.ReadElement()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
at System.Xml.Xsl.Xslt.XsltInput.MoveToNextSibling()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List`1 content, InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadTemplate(NsDecl stylesheetNsList)
at System.Xml.Xsl.Xslt.XsltLoader.LoadRealStylesheet()
at System.Xml.Xsl.Xslt.XsltLoader.LoadDocument()
at System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
And this is part of my xslt:
<xsl:template match="Sektion2" mode="output"> <!-- Output for standard content --> Indhold til side 3 <section id="{@urlName}"> <div class="greyTransperentTop">&bsp;</div> <header> <h1><xsl:value-of select="@nodeName" /></h1> </header> <div class="text"> <xsl:value-of select="bodyText" disable-output-escaping="yes" /> </div> </section> </xsl:template>
Okay Kate glad that I could helping you finding a solution. Remember to mark the post as solved so others can go straight to the solution if they come across the same problem.
I get an error when I write in my xslt file
Hi
This is the error I get:
And this is part of my xslt:
The problem is in this line:
<div class="greyTransperentTop">&bsp;</div>
Can anybody help me with that?
/Kate
Hi Kate
use instead of &bsp;
you were missing the n :)
Gary
lol it didn't show in the comment put an 'n' before the 'b' :)
Sorry, it's me who has written wrong in this post.
It does not work with either.
Hi Kate,
Did you have this snippet in the top your XSLT file,
Alternatively, you could try this   and see if it makes any difference.
/Dennis
Some other alternatives to my post above could be:
<div class="greyTransperentTop">
<xsl:text disable-output-escaping="yes">&</xsl:text>nbsp;
</div>
<div class="greyTransperentTop">
<xsl:text disable-output-escaping="yes"><![CDATA[ ]]></xsl:text>
</div>
<div class="greyTransperentTop">
<xsl:text disable-output-escaping="yes"> ></xsl:text>
</div>
Hope at least one of these will work for you Kate :-).
/Dennis
it works beautifully with  
Thanks
Okay Kate glad that I could helping you finding a solution. Remember to mark the post as solved so others can go straight to the solution if they come across the same problem.
/Dennis
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.