Hi Manuel,
It took me a long time to see the problem.
There are actually two issues:
In your rule file main element you use the prefix qti to define the namespace, but in the translateRule you don’t use that prefix:
Your example: <its:translateRule itsx:idValue="@pid" selector="//p" translate="yes"/>
What you should use: <its:translateRule itsx:idValue="@pid" selector="//qti:p" translate="yes"/>
Then the rule applies to the p in that namespace. In your current rule file the rule applies to p without namespace.
Now even with this fix things were not working…
That’s because there is a second problem:
The namespaces are different:
Rule file: "http://www.imsglobal.org/xsd/imsqti_v2p1"
XML file: "http://www.imsglobal.org/xsd/imsqti_v2p2"
If you change your rule file to:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<its:rules xmlns:its=http://www.w3.org/2005/11/its xmlns:itsx=http://www.w3.org/2008/12/its-extensions xmlns:okp="okapi-framework:xmlfilter-options" xmlns:qti=http://www.imsglobal.org/xsd/imsqti_v2p2 xmlns:xlink=http://www.w3.org/1999/xlink version="2.0">
<its:translateRule itsx:idValue="@pid" selector="//qti:p" translate="yes"/>
</its:rules>
It should give you something like this (here with Tikal):
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" xmlns:its=http://www.w3.org/2005/11/its xmlns:itsxlf=http://www.w3.org/ns/its-xliff/ its:version="2.0">
<file original="test.xml" source-language="en" target-language="fr" datatype="xml" okp:inputEncoding="UTF-8" okp:configId="/C:/Dev/Okapi/dev/trunk/deployment/maven/dist_win32-x86_64/test/okf...@rules.fprm">
<body>
<trans-unit id="1" resname="foo">
<source xml:lang="en">Bar</source>
<target xml:lang="fr">Bar</target>
</trans-unit>
</body>
</file>
</xliff>
Hope this helps.
-yves
--
You received this message because you are subscribed to the Google Groups "okapi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-users/CABm46barPaqmBejjxM0L%2BkDE-o7y%2B9_y%2B%3DgJ3JoxkYyfUaQsaQ%40mail.gmail.com.