I got a question about applying custom itemstyle.xsl to CQWP.
I extracted existing CQWP, renamed it, and uploaded to webpart gallery on a site collection.
The modified CQWP web part worked with no problem at all under default itemstyle.xsl
After that, i copied itemstyle.xsl, renamed it to customitemstyle.xsl, and uploaded it to 'XSL Style Sheet' folder under Style Library and published the xsl file.
Once i published the file, i opened modified CQWP (.webpart file) in SPD then made a change to get modified xsl file applied. the change is listed below;
<property name="ItemXslLink" type="string" />/Style Library/XSL Style Sheets/customitemstyle.xsl</property>
After i uploaded the new CQWP, I tried to add the CQWP to a page but got an error saying cannot add webpart and make sure it is correct web part file (.dwp or .webpart file) and make sure the xml is well formed xml.
Now I get stucked to resolve the error and apply custom itemstyle to CQWP.
Can anybody help me? Did I miss anything?
Any comments, guide and direction will be appreciated.
Thank you.
You've probably figured it out by now, but the XML you have provided in your post isn't valid.
The property element is closed twice:
<property name="ItemXslLink" type="string" />XSL path</property>
First with a />-tag and after that the </property>-tag.
Related
Is it possible to translate work items to another language? for example change the field "Area Path" in a PBI to our language (Hebrew) "אזור", so the resulting xml would look something like this:
<FIELD name="אזור" refname="System.AreaPath" type="TreePath" reportable="dimension" />
The problem is that whenever I try to import my changes into tfs (via witadmin) I get the following error:
"TF26177: The field System.AreaPath cannot be renamed from 'Area Path' to 'אזור'."
Can I get help please?
https://msdn.microsoft.com/en-us/library/ms194968.aspx covers the parts that can be localized. I believe there are also language packs that might do some of this for you.
OK, i think i have found the way to do it. I was trying to rename the field via the command "witadmin renamewitd...", but it should be used with the command "witadmin changefield..." instead. Well, at lease I hope i'm right on this one :)
Update: nschonni posted a useful link for more info.
Trying to design a facelet using Mojarra tags.In base template trying to load the property file using loadBundle tag.During runtime getting error like below
Can't find resouce for bundle web/test/properties/sample key en_GB
Placed the property file in the below location
webapp/test/properties/sample.properties and adding this like below
<f:loadBundle basename="test.properties.sample" var="msgs" />
Also I tried to place the property file under webapp/resources/test/properties/sample.properties but no hopes.
Could anyone please throw some light to resolve the issue?
Thanks in advance.
First of all, the resource bundle should be in the src folder. But you can find here a detailed example about resource bundles: http://www.mkyong.com/jsf2/jsf-2-0-and-resource-bundles-example/
I hope it helps!
I have the MvxBindingAttributes.xml in my UI.Droid/Resources/Values but everytime I try to use the bindings in my layouts I get
Warning attribute is not declared.
No resource identifier found for attribute 'MvxBind' in package
'DroidUI'
so for some reason it cannot find those attributes. I have tried to close/reopen/clean/rebuild with no luck, tried removing the layouts and then building (Hoping it would add them at build) and then try to add them again, but nothing seems to work
Have you checked that the MvxBindingAttributes.xml file is marked in properties as an AndroidResource?
VisualStudio likes marking the xml files as content or none instead - especially if you've added the MvxBindingAttributes.xml file as a link.
As an update to this, you can also now use a special 'auto' xml scheme:
xmlns:local="http://schemas.android.com/apk/res-auto"
In the project properties, add a Android Manifest file and add a package name that contains at least two periods, for example:
com.DroidUI
In the axml file, type the package name instead of the namespace:
xmlns:local="http://schemas.android.com/apk/res/com.DroidUI
xmlns:local="http://schemas.android.com/apk/res-auto
Fixed it for me.
First, thanks for the answer. I had the same problem.
But in my case, attempting to use the suggestions above failed. or at least that is what i thought.
When i used local:MvxItemTemplate=#layout/My_Manifest while i had the My_Manifest.axml file correctly placed in Layout folder, and correct xml schemas, it still had problems.
But, when i changed My_Manifest to my_manifest while leaving the actual file name as My_Manifest.axml, everything was working.
just wanted to share
In my case for some reason the MvxBindingAttributes.xml file existed, but hadn't been included in the project. Right-clicking on MvxBindingAttributes.xml and choosing "Include in Project" sorted the problem for me.
Just in case: You might also have rubbish (in my case, it were dots) in some of your XML. But the error pointed "Maybe there's something wrong with the auto-generated XML lol" so it took me half an hour to notice it... Sigh!
I'm trying to create an ical-file.
So I set Router::parseExtensions('ics') in router.php.
I created a folder ics in app/views/layouts and a default.ctp with this content
<?php
header('Content-Type: text/calendar');
echo $content_for_layout;
?>
In my reservationsController I created a ical() action and created a ical.ctp in /app/views/reservations/ics/.
So, if I'm trying to access http://localhost/reservations/ical/1.ics I get an error:
Error: The view for ReservationsController::ical() was not found.
Error: Confirm you have created the file: C:\xampp\htdocs\ers\app\views\reservations\ical.ctp
So I'm a bit confused about the error-message. Why does it search the ical.ctp in app\views\reservations\ and not in app\views\reservations\ics\?
When I'm using another extension like .xml the error message looks like this:
Error: Confirm you have created the file: C:\xampp\htdocs\ers\app\views\reservations\xml\ical.ctp
Why does xml work and ics don't? What went wrong?
I've just finished dealing with this situation myself. I'd been trying to get a csv extension to display, and I was also getting the "missing view" error.
Everything was in place; I had my /app/views/layouts/csv/default.ctp and /app/views/users/csv/export.ctp view files set up. I had Router::parseExtensions('csv'); at the top of my /app/config/routes.php file.
Turns out, what I had forgotten was to add the RequestHandler component to my controller's components array: var $components = array('RequestHandler');.
Once I did that everything worked perfectly.
So if you've stumbled upon this question because you're having the same issue, check to be sure you're loading the RequestHandler component fixes things for you...
I just had the same trouble creating the ics example # http://www.dereuromark.de/2011/11/21/serving-views-as-files-in-cake2
Needed quite a while to figur out that this seems to be a cake bug and opend a ticket for it :)
http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/2565-cakeresponse-is-missing-icalendar-and-not-responding-as-documented
Hopefully this will be resolved soon.
PS: I also posted a workaround / quickfix for this until it is fixed in the core.
I'm trying to use xmltask for ant to modify a file in a subdirectory:
project/path/to/file.xml
The file refers to a DTD like this:
<!DOCTYPE data SYSTEM "mydtd.dtd">
I don't have the flexibility to change these documents.
This DTD is stored in the same subdirectory, which has always worked fine:
project/path/to/mydtd.dtd
Unfortunately, xmltask is trying to locate the dtd in my project's top-level directory, which is where my build file is located, and where I run from:
[xmltask] java.io.FileNotFoundException: /home/me/project/mydtd.dtd (The system cannot find the file specified)
I see in the xmltask documentation that I can correct this with an xmlcatalog element to tell it where to look up the file. But I need to use a dtd element, and I can only find examples for this element, not documentation; the examples show only a publicId, and if I understand XML correctly this document does not have one. I shouldn't need to specify this, anyway, right, since my document already says my DTD is stored locally and shows right where it is?
Why isn't xmltask finding the DTD correctly? What's the best way to correct or work around this situation?
An XML Catalog is the way to go here, it just needs a bit more perseverance.
As you correctly pointed out, the standard Ant <XmlCatalog> type only allows you to specify public DTD references when using the inline syntax, which is of no use to you. However, <XmlCatalog> also lets you specify a standard OASIS-syntax catalog, which is far richer, including resolving SYSTEM DTD references.
An OASIS catalog (full spec here) looks like this:
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="mydtd.dtd" uri="project/path/to/mydtd.dtd"/>
</catalog>
You can then reference this catalog from the <XmlCatalog>:
<xmlcatalog refid="commonDTDs"/>
<catalogpath>
<pathelement location="path/to/oasis.catalog"/>
</catalogpath>
</xmlcatalog>
And that's that. It's a good idea to build up a reusable OASIS catalog file, and refer to it from various XML-related Ant tasks, all of which can use <XmlCatalog>.
As an alternative, it looks like I can skip the whole validation by creating a blank file with the same name as the DVD file, and then deleting the file when I am done. Odds are I am going to go that route instead of using the catalog.
xmltask isn't finding it because it is looking in the current working directory. Ant allows you to specify a base directory using the basedir attribute of the <target> element. So I suggest you try this:
<target basedir="path/to" ...>
<xmltask...
</target>
It strikes me that it is not the XML/DTD that you really have the problem with, but getting xmltask to interact with the two of them as you want.
If that fails, you could use the Ant Copy task to copy the XML and DTD to the root folder before processing with xmltask, then copying back again.
Have you tried:
<!DOCTYPE data SYSTEM "./path/to/mydtd.dtd">
? Or an absolute path?
Also, you can find <dtd> description here.
I had a similar problem where an XML file had a doctype with SYSTEM reference that could not be changed.
<!DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-modules.dtd">
I first went down the road and created a catalog file with the OASIS catalog as described above, but to be able to use external catalogs I had to include the Apache Commons Resolver 1.1 (resolver.jar) in the Ant classpath (see http://ant.apache.org/manual/Types/xmlcatalog.html).
Because I had multiple machines on which this build was supposed to run this seemed overkill, especially since xmltask worked fine if I just removed the doctype definition. I wasn't allowed to remove it permanently because the doctype was needed elsewhere.
Ultimately I used this workaround: I commented out the doctype definition using Ant's replace task, ran the xmltask, and then put the doctype back into the file.
<replace file="myxmlfile.xml">
<replacetoken><!DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-modules.dtd"></replacetoken>
<replacevalue><!-- !DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-modules.dtd" --></replacevalue>
</replace>
<xmltask .../>
<replace file="${local.opencms.webapp.webinf}/config/opencms-modules.xml">
<replacetoken><!-- !DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-modules.dtd" --></replacetoken>
<replacevalue><!DOCTYPE opencms SYSTEM "http://www.opencms.org/dtd/6.0/opencms-modules.dtd"></replacevalue>
</replace>