Custom translator cannot extract contents of XLIFF file - microsoft-translator

The XLIFF (version 2.0) files I upload for training the custom translator always come up with the same error: "Failed to extract the contents of the uploaded file."
I used a schema to ensure the formatting of the file is correct and simplified it to 1 translation but it still doesn't work. This is what the file looks like:
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en-US" trgLang="es-ES">
<file id="f1" original="Graphic Example.psd">
<skeleton href="Graphic Example.psd.skl"/>
<unit id="1">
<segment>
<source>Calculating...</source>
<target>Calculando...</target>
</segment>
</unit>
</file>
</xliff>

We don't currently support Xliff 2.0. It's something that we want to add in very soon, but currently we only support version 1.2 and older.

Related

Pull data from reference tables (displayed in XML format) and store it in another XML file

I want to link a reference table, (given to me in XML format via link, from a remote server) into another XML file.
For example
<reference>
<listName>countries</listName>
<itemCount>191</itemCount>
<item type="Country" row="1">
<id>1104</id>
<name>TURKEY</name>
</item>
</reference> <!-- Added by edit -->
The thing is that every single item is in different XML, with different link. So I need to link them all and, (in a way) filter the information in a new XML, which to then import to Word Press.
If not XML to XML, then XML to JSON or CSV is ok. Or if there is an software to help me do this.
Thank you in advance.
The best way is to use some online tool where you can load data from URL i found one editor you can use that or use some similar online tool.
Online Ide for xml to json

Is it possible to access a html outside of webapp?

I have a process to generate html file dynamically, but i dont want to place those html files under the webapp, because if the project are re-deployed, I have to deal with the existing html files(copy out and copy in).
So I'm just wondering if I can place the html files outside of the webapp.
If not, is there any other proper way to meet the requriement?
I'm using tomcat.
Appropriate your help.
Create below dir if not exist:
${CATALINA_HOME}/conf/Catalina/localhost
Create a xml file "article.xml", place the xml under the above path as follows.
${CATALINA_HOME}/conf/Catalina/localhost/article.xml
Add below content to the xml.
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/article" docBase="C:/apps/blog/article" debug="0"
reloadable="true" privileged="true">
</Context>
Start tomcat.
If there's aa.html under the C:/apps/blog/article, use http://localhost:8080/article/aa.html to access the html.
NOTE:
1. Tomcat will take the xml as an web application, and load the resource configed in the xml.
2. No need to create WEB-INF and META-INF for the external folder(C:/apps/blog/article here).

Converting folder of XML files to folder of HTML files

I have a folder of several hundred XML files that I would like to convert into a folder of HTML files. I've created an XSLT that works in w3schools.com's XSLT tester, but I'm not sure how to apply that stylesheet across hundreds of XML documents. My XML looks like this (and the only nodes I'm interested in are title, author, and lyrics):
<?xml version='1.0' encoding='utf-8'?>
<song xmlns="http://openlyrics.info/namespace/2009/song" version="0.8" createdIn="OpenLP 2.0.1" modifiedIn="OpenLP 2.0.1" modifiedDate="2012-03-14T02:21:52">
<properties>
<titles>
<title>Amazing Grace</title>
</titles>
<authors>
<author>John Newton</author>
</authors>
</properties>
<lyrics>
<verse name="v1">
<lines>Amazing grace, how sweet the sound<br/>That saved a wretch like me<br/>I once was lost, but now am found<br/>Was blind but now I see</lines>
</verse>
A couple questions about this:
1) Might it be better to use XQuery since I'm only interested in extracting a few lines per XML file?
2) Regardless of XSLT/XQuery, how can I implement a solution that converts a folder of XML files (without manually editing each one to call upon the XSL stylesheet)? I'm running OS X 10.8.4.
Thanks in advance.
Just write your own shell script using the xsltproc command. This is what I used successfully for XSLT batch processing.
Or just open a shell, cd to the folder with the XML files and then enter the following two commands:
mkdir results
xsltproc -o results/ path/to/stylesheet.xslt *.xml
I think XQuery would be more convenient if you had all of your XML in a database, but on the filesystem XSLT may be simpler.
I would just use Saxon-PE, and invoke it from a shell script. You could also use Automator.

Create jar file that can be executed on any machine

I have simple java app that prints `hello world!' on console. It is packed in app.jar.
Jar structure:
main/Hello.class - my main class with singe println method
META-INF/MANIFEST.MF
Manifest file contains following:
Manifest-Version: 1.0
Main-Class: main.Hello
Everything goes fine.
But when you have a dependency than troubles begin. I'm not sure but think in this case you have to put all libs to jar file. If I put them in META-INF/lib I must specify "Class-Path" in manifest. How "Class-Path" will look?
P.S There are some resembling questions but I haven't found appropriate answer.
I tend to use an ANT build script to package my application and all necessary jar files. I find this makes life much easier once you've got it working properly.
build.xml file looks something like:
<project default="create_run_jar" name="Create Runnable Jar for MyProject">
<!--ANT 1.7 is required -->
<target name="create_run_jar">
<jar destfile="my-runnable-jar.jar">
<manifest>
<attribute name="Main-Class" value="my.MainClass"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="E:/path/to/my/project/bin"/>
<fileset dir="E:/path/to/my/project/classes"/>
<zipfileset src="E:/path/to/library/some-library.jar"/>
</jar>
</target>
</project>
Note that if you use Eclipse, you can simplly do File / Export... / Runnable jar file and it will do everything for you (including generating the ANT build.xml).
You don't have to specify anything special if you unpack the libraries and integrate them into your project. If you do this, you should have a "main" folder, and if you have org.apache.foo as an external library, you'll also have an "org" folder at the top level.

How to build HTML Documentation with Sandcastle

How to build CHM / HTML Documentation with Sandcastle? Can build HTML file from XML or have to used .cs and dll files?
How to build CHM / HTML Documentation with Sandcastle?
Use the Sandcastle Help File Builder.
Can build HTML file from XML or have to used .cs and dll files?
I think it uses the *.dll and the *.xml (both together) as input. One of the 'tips' in the SHFB documentation says,
"When selecting either an assembly or an XML comments file, the help file builder will automatically add the partner file for you (i.e. the XML comments file for the like-named assembly or the assembly for the like-named comments file). Multiple files can also be selected and added in one go or dragged from Windows Explorer and dropped on the Documentation Sources node."
Sandcastle uses dll to generate documentation. It also needs the xml from code comments to be build by visual studio. To do that, basically select output XML from your project build properties and then open the csproj (your VS project) in SandCastle Help file builder.