SP2010, CQWP showing <a> on title field - sharepoint-2010

I have the following line CQWP in itemstyle.xsl:
xsl:value-of select="#Title"
now i want a hyper link on title to navigate on my list item on from this CQWP.
please help me.
I am using Custom List.

<xsl:value-of select="#Title"/>

Related

Find xpath of element knowing a part of href attribute only selenium ide ui vision katalon recorder

I need to detect via xpath an element (image with href) but i know a part of href only
This is the html
<img src="//user/banners/16/08/1614708.gif" alt="AAA" data-tip="BBB" currentitem="false" class="" width="468" height="60">
I know the id 123456 (part of href)
I tried this xpath that recognize element with a part of href but working in text link only
xpath=//a[contains(#href, "123456")]
How can i detect the element using a part of href only ?
I need xpath only please.
You need get /img in //a where href attribute contains() or ends-with() your id
This is XPATH that you need. At least i would use this XPATH in this situation
//a[ends-with(#href, 'your-id-here')]/img
You can use regular expresions. Something like
driver.find_element_by_xpath("//input[starts-with (#name,'Tut')]")
or as you described
driver.find_element_by_xpath("//input[contains(#name,'sel')]").
Be awere of one thing, do not use double quotes, for the string you are searching as atribute value. Use a single quote like I previously described.

How do I add HTML tags and links in QnA-maker?

I have tried the suggestions provided for other similar questions but they didn't work.
here 2 example:
1) Link: name of your link is changed by QnAMaker during the save and train step in name of your link](https://url.com)) and it is diplayed in the test feature
name of your link](https://url.com))
2) <b> bold text </b> is not changed in bold and the same thing happens with the escaped html
Did you consider markdown? You examples are supported.
Cheatsheet to help you on you way.

fo:change-bar-begin is not a child of fo:inline fop 1.1

I am using FOP 1.1 and I am trying to make use of fo:change-bar-begin, but I am getting the following error:
org.apache.fop.fo.ValidationException: "fo:change-bar-begin" is not a valid child of "fo:inline"!
According to W3C Recommandation, change-bar-begin and change-bar-end define "points" and may be used anywhere as a descendant of fo:flow or fo:static-content, basically in any fo:block or fo:inline.
Sample code:
<fo:block background-color="Tomato" text-indent="-57.5pt" start-indent="57.5pt">
<fo:inline background-color="aquamarine" font-size="10" font-family="Arial, sans-serif">1.</fo:inline>
<fo:change-bar-begin change-bar-offset="2mm" change-bar-color="red" change-bar-style="solid" change-bar-class="cc01"/>
<fo:inline background-color="LightSteelBlue" keep-with-previous="always" font-size="10" font-family="Arial, sans-serif" padding-left="48.39pt">Remove panel.</fo:inline>
<fo:change-bar-end change-bar-class="cc01"/>
</fo:block>
What do I do wrong?
Thank you!
Florin
It looks okay to me, and you are correct about fo:change-bar-begin being allowed anywhere as a descendant of fo:flow or fo:static-content. So this looks like it is a FOP bug.
In your example, fo:change-bar-begin is not actually a child of fo:inline. Did you try putting the change bar FOs inside the fo:inline?
FWIW, there is a formatted change bar example in the "Comprehensive XSL-FO Tutorials and Samples Collection" at https://www.antennahouse.com/antenna1/comprehensive-xsl-fo-tutorials-and-samples-collection/.

How to get the xpath for the span button

I am new to selenium IDE and trying to get the target in the right order.
I have tried many combination to get the right element when there is span for the button. I need to get the xpath for the "Read More" button.Can someone please advise how the target in the IDE should be.
Here is the code:
<div class="is_centered l_bottom_pad">
<a class="btn_teal_outline has_arrow" href="https://test.com/jobs/view.php?id=8">
<span>Read More</span>
</a>
</div>
In some browsers (I think it was mainly MSIE) it is necessary to address the <a> element, not its child <span> in order to click a button or link. So you should adress:
//a[span[text()='Read More']]
Or you go directly for LinkText ("Read More") instead of XPath!
Targeting for span button is very simple. Just see what is unique attribute in that element.
I feel the button text itself is unique.Try this one
xpath=.//span[text()='Read More']

How to compute an href value with Diazo rules

I am trying to change the hrefs of certain <a> elements in the theme by computing the URLs using values I select from the content. However, I can't figure out how to change the href attribute at all. It seems like the attributes attribute is not understood in the <replace> rule.
Ultimately, I would like to be able to do something like:
<replace css:theme="a.languageswitcher" attributes="href">
<!-- use some XSL logic here to stitch together the new href -->
</replace>
So the following rules work, but are useless to me:
<copy attributes="href" css:theme="a.languageswitcher" css:content="#portal-logo" />
<merge attributes="href" css:theme="a.languageswitcher" css:content="#portal-logo" />
But this one already does not work, the attributes="href" makes it so this rule is ignored.
<replace attributes="href" css:theme="a.languageswitcher" css:content="#portal-logo" />
On the other hand, if I try to rebuild the <a> element from scratch, then I run into the error described by #ross-patterson in his question: Diazo - Conditionally add a class to a theme element:
<replace theme="//a[#class='languageswitcher']">
<a class="languageswitcher">
<xsl:attribute name='href'>
foo
</xsl:attribute>
</a>
</replace>
produces the error:
XSLTApplyError: xsl:attribute: Cannot add attributes to an element if children have been already added to the element.
How can this be done?
Something like this ought to work:
<replace css:theme="a.languageswitcher">
<xsl:for-each css:select="a.languageswitcher">
<xsl:variable name="link">
http://example.com
</xsl:variable>
<xsl:copy-of select="." />
</xsl:for-each>
</replace>
in a theme I used this rule
<replace css:content-children="#hptoolbar-cerca"><xsl:attribute name="href">
<xsl:value-of select="//li[#id='portaltab-catalog']//a/#href" /></xsl:attribute><xsl:apply-templates select="node()"/></replace>
to modify an href of #hptoolbar-cerca with the href from another element in the content.
Maybe this could be useful for you.
Vito
My case is similar. I am happy with my theme code, only want to "replace" its href values. With XPath copied in the Chrome inspector, the simplest rule looks like this:
<copy attributes="href"
theme="/html/body/div[2]/div[1]/div/div[1]/a"
content="//*[#id='portal-logo']" />
I expect to successfully apply this trick to all the href values, but some do not work. I find these <a> elements are in the code block manipulated by JavaScript for implementing Slide effect. I remove all its related JavaScript codes, and copy its "real" XPath again, finally everything works fine as expected. Hope this helpful.