Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Evan 344 posts 99 karma points
    Mar 13, 2009 @ 17:39
    Evan
    0

    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">















  • Evan 344 posts 99 karma points
    Mar 13, 2009 @ 17:48
    Evan
    0

    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">













  • Peter Dijksterhuis 1442 posts 1722 karma points
    Mar 13, 2009 @ 18:14
    Peter Dijksterhuis
    0

    Try this:

    [code]

    [/code]

    Put it right before

    Not tested, but I think it should work

    PeterD

  • Evan 344 posts 99 karma points
    Mar 13, 2009 @ 18:54
    Evan
    0

    [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(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)

    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">













  • Evan 344 posts 99 karma points
    Mar 13, 2009 @ 19:44
    Evan
    0

    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">













  • Daniel Lindstrom 454 posts 271 karma points
    Mar 14, 2009 @ 04:50
    Daniel Lindstrom
    0

    Good you solved it. Wrapping the offending tags in CDATA would be another, and maybe more readable option.

Please Sign in or register to post replies

Write your reply to:

Draft