I am writing a store-esq site where the custmer can show their inventory and not sell online. I need to display the thumbnails of the products on the parent "Store" page, and I have that working, however now I need to count the number of thumbnails, put them in a table, and if the position is > 6, start a new row. Here is my code so far:
System.Xml.XmlException: The 'xsl:text' start tag on line 42 does not match the end tag of 'tr'. Line 43, position 3.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSiblingHelper()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
at System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChildAny()
at System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChild()
at System.Xml.Xsl.Xslt.XsltLoader.XslText()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)<br />
at System.Xml.Xsl.Xslt.XsltLoader.XslIf()<br />
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.XslForEach()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)<br />
at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)<br />
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)
at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 content, InstructionFlags flags)<br />
at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)<br />
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List1 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)
Listing out some thumbnails...
I am writing a store-esq site where the custmer can show their inventory and not sell online. I need to display the thumbnails of the products on the parent "Store" page, and I have that working, however now I need to count the number of thumbnails, put them in a table, and if the position is > 6, start a new row. Here is my code so far:
]>
<>
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"
exclude-result-prefixes="msxml umbraco.library">
Edit: New code to put everything in a table, just need to count now...
]>
<>
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"
exclude-result-prefixes="msxml umbraco.library">
Try this:
[code]
[/code]
Put it right before
Not tested, but I think it should work
PeterD
[quote=PeterD]Try this:
[code]
[/code]
Put it right before
Not tested, but I think it should work
PeterD[/quote]
Gives me this:
Error occured
System.Xml.XmlException: The 'xsl:text' start tag on line 42 does not match the end tag of 'tr'. Line 43, position 3.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSiblingHelper()
at System.Xml.Xsl.Xslt.XsltInput.ReadNextSibling()
at System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChildAny()
at System.Xml.Xsl.Xslt.XsltInput.MoveToFirstChild()
at System.Xml.Xsl.Xslt.XsltLoader.XslText()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List
1 content, InstructionFlags flags)<br /> at System.Xml.Xsl.Xslt.XsltLoader.XslIf()<br /> at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List
1 content, InstructionFlags flags)at System.Xml.Xsl.Xslt.XsltLoader.XslForEach()
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List
1 content, InstructionFlags flags)<br /> at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)<br /> at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List
1 content, InstructionFlags flags)at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)
at System.Xml.Xsl.Xslt.XsltLoader.LoadInstructions(List
1 content, InstructionFlags flags)<br /> at System.Xml.Xsl.Xslt.XsltLoader.LoadLiteralResultElement(Boolean asStylesheet)<br /> 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)
code:
]>
<>
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"
exclude-result-prefixes="msxml umbraco.library">
I am so close, it just does not like the in the if statement for some reason, how can I get around this?
I fixed it, here is the code:
]>
<>
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"
exclude-result-prefixes="msxml umbraco.library">
Good you solved it. Wrapping the offending tags in CDATA would be another, and maybe more readable option.
is working on a reply...