I have the following for-each select;
"sc:item($myFolder,.)/descendant::item [@template='myTemplate']". According to Sitecore's own profiler this returns crawls through 16.000 items, although there are only approx 1700 items with the mentioned template.
Could this be optimized - if so, how?
...
Hello,
I'm using DataFormWebPart to display all announcements in the SharePoint site collections. It uses SPDataSouce with DataSourceMode set to CrossList and it works OK. The text of the announcement comes from the XML attribute:
<xsl:value-of disable-output-escaping="yes" select="@Body" />
Now I need to limit this text to, say, 250...
I'm trying convert an XML file to text using XSLT, but I don't have any experience using XSLT.
Here's a sample XML file:
<DOC xsi:noNamespaceSchemaLocation="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DOC_REQUISITES DOC_DATE="2009-04-23" DOC_NO="99999999"/>
<DOCID TradeDate="2009-04-23" Weekday="Monday" MainFirmId="Z...
I am trying to assign the position of an element like this:
<xsl:variable name="offset" select="ancestor::myparent/position() * 8"/>
I am trying to show the result of the calculation in the output, so using a selector is not enough. xsltproc generates the following error:
XPath error : Invalid expression
ancestor::myparent/position()...
Within my XSLT spreadsheet, I need to define an xsl:variable with one value or another depending on the value of an xml node. The code just below shows what I'm trying to do. I would like to define multiple variables this way.
A major issue is that in order to choose a variable value based on the node value of each item, the choosing mu...
Does someone know a tool, that can extract the code structure from undocumented xsl files?
I know there is XSLTdoc, which can extract documentation elements from xsl files to build html reference pages. But for undocumented xsl files, XSLTdoc's output is rather useless.
Doxygen is able to produce valuable output even if the code is not...
one of the toughest challenges I have ever faced in XSLT designing ..
How to copy the unique characters in a given string ..
Test xml is:
<root>
<string>aaeerstrst11232434</string>
</root>
The output I am expecting is:
<string>aerst1234</string>
...
Hi
I want to go from this :
<detail>
<BusinessError>
<environment>Test</environment>
<businesserror>
<BusinessCode>my_businesscode</BusinessCode>
<BusinessMessage>my_businessmessage</BusinessMessage>
</businesserror>
</BusinessError>
</detail>
To this (only the businesserror element is of interest)
...
Hello All,
I am using XSLT Transformation and need to put some data in CDATA section and that vale is present in a variable.
Query: How to access variable in CDATA ?
Sample Given Below:
<xsl:attribute name ="attributeName">
<![CDATA[
I need to access some variable here like
*<xsl:value-of select ="$AnyVarible"/>*
]]>
</xsl:att...
Very simply, is it possible to type an XSLT template or function to return a named sequence constructor?
e.g. in FpML, there is the Product.model group, which simply contains two elements (ProductType and ProductId). I'd like to be able to create a typed template which returns that sequence, but have no idea what the "as" attribute shou...
Hi I am usually programming in c++ so XML/XSL/XPATH is not my strong side, but I need to do a transformation and I cannot seem to find a good way of doing it.
We have an xml file that is formatted like this:
<outer>
<element/>
<other_element/>
<message pri="info">
[[!CDATA Error: something is not working]]
</message>
<me...
I need to remove currency formatting from a string, but my problem is that the field sometimes contains currency and sometimes it is a string of text. So it could be:
$20
123,000.00
$123,000.00
Hello World!
...
Is there a way to change the footer image in each page of xsl-fo according to certain condition?
...
Hello everyone,
I was wondering whether it's possible to sort some elements first and store them (already sorted) in a varible. I would need to refer to them thought XSLT that's why I'd like to store them in a variable.
I was trying to do the following, but it doesn't seem to work
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/...
I'm writing javascript code to traverse and manipulate deeply nested XML documents. With modern browsers, is there still a need for crossbrowser libraries like:
sarissa
ajaxslt
As far as I know, without using one of these there won't be any XPath in IE with ActiveX disabled. And a simple wrapper is needed for both XSLT and XPath to d...
I searched the web and I searched stackoverflow up and down. No solution. Although I found solutions how to do this within pure xslt here.
But the problem is that the resulting xml will be several hundred MB large. So I must do this with SAX in Java. (please no xslt solution, although I tagged it with xslt ;-))
Let me explain with more...
So,
I have an XSLT template which expects a node set as a parameter and uses this as display text. However, sometimes this node is empty in the XML and I want to pass default display text instead of the display text not showing up instead:
Works:
<xsl:call-template name="myTemplate">
<xsl:with-param name="parm1" select="//element"...
I have created a stylesheet that is supposed to selectively copy the contents of an XML document so that I can strip out data that we do not need. I have provided 2 examples below and the stylesheet that we are currently using to do this. The stylesheet works, but I think there is probably a better way of doing it because in the curren...
I'm transforming XML to HTML. In part of the XML, I need to count elements that seem "identical" when specific descendants are compared, while other descendants and any attributes must be ignored.
Here's a simplified example of my XML. The real thing is much more complicated; I've just removed elements that aren't relevant to the counti...
I wanted to find out if there is a way of getting a parameter or variable value out of an XSL file. For example, if I have the following:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="username" select ="usertest"/>
<xsl:variable name="password" select ="pass"/>
<!-- ... -->
</x...