<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://okapiframework.org/wiki/index.php?action=history&amp;feed=atom&amp;title=SRX_Extensions</id>
	<title>SRX Extensions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://okapiframework.org/wiki/index.php?action=history&amp;feed=atom&amp;title=SRX_Extensions"/>
	<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=SRX_Extensions&amp;action=history"/>
	<updated>2026-04-17T17:29:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=SRX_Extensions&amp;diff=325&amp;oldid=prev</id>
		<title>Ysavourel: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=SRX_Extensions&amp;diff=325&amp;oldid=prev"/>
		<updated>2016-06-04T23:19:59Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:19, 4 June 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ysavourel</name></author>
	</entry>
	<entry>
		<id>http://okapiframework.org/wiki/index.php?title=SRX_Extensions&amp;diff=324&amp;oldid=prev</id>
		<title>Ysavourel at 05:43, 23 June 2011</title>
		<link rel="alternate" type="text/html" href="http://okapiframework.org/wiki/index.php?title=SRX_Extensions&amp;diff=324&amp;oldid=prev"/>
		<updated>2011-06-23T05:43:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
The Okapi framework implements a few extensions to [[SRX]].&lt;br /&gt;
&lt;br /&gt;
It is important to use those extensions carefully as they may make your SRX document incompatible with other SRX implementations. They may also make your SRX document compatible with some implementations, for example some systems trim white spaces from segments automatically even if there is no such option is SRX&amp;amp;nbsp;2.0.&lt;br /&gt;
&lt;br /&gt;
The namespace to declare them is &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://okapi.sf.net/srx-extensions&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the extensions are placed at the end of the &amp;lt;code&amp;gt;&amp;amp;lt;header&amp;gt;&amp;lt;/code&amp;gt; element of the SRX file. For example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;srx xmlns=&amp;quot;http://www.lisa.org/srx20&amp;quot; version=&amp;quot;2.0&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  &amp;lt;span class='hi'&amp;gt;&amp;lt;nowiki&amp;gt;xmlns:okpsrx=&amp;quot;http://okapi.sf.net/srx-extensions&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&amp;gt;&lt;br /&gt;
  &amp;lt;header segmentsubflows=&amp;quot;yes&amp;quot; cascade=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;formathandle type=&amp;quot;start&amp;quot; include=&amp;quot;no&amp;quot;&amp;gt;&amp;lt;/formathandle&amp;gt;&lt;br /&gt;
   &amp;lt;formathandle type=&amp;quot;end&amp;quot; include=&amp;quot;yes&amp;quot;&amp;gt;&amp;lt;/formathandle&amp;gt;&lt;br /&gt;
   &amp;lt;formathandle type=&amp;quot;isolated&amp;quot; include=&amp;quot;no&amp;quot;&amp;gt;&amp;lt;/formathandle&amp;gt;&lt;br /&gt;
   &amp;lt;span class='hi'&amp;gt;&amp;lt;okpsrx:options oneSegmentIncludesAll=&amp;quot;yes&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span class='hi'&amp;gt; trimLeadingWhitespaces=&amp;quot;yes&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span class='hi'&amp;gt; trimTrailingWhitespaces=&amp;quot;yes&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span class='hi'&amp;gt;/&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span class='hi'&amp;gt;&amp;lt;okpsrx:sample language=&amp;quot;en&amp;quot; useMappedRules=&amp;quot;yes&amp;quot;&amp;gt;Mr. Holmes is from the U.K.&amp;lt;/okpsrx:sample&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
   &amp;lt;span class='hi'&amp;gt;&amp;lt;okpsrx:rangeRule&amp;gt;pattern&amp;lt;/okpsrx:rangeRule&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;/header&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
 &amp;lt;/srx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== trimLeadingWhitespaces ====&lt;br /&gt;
&lt;br /&gt;
This extension indicates that leading white spaces in the segments should be moved out of the segment.&lt;br /&gt;
&lt;br /&gt;
Possible values: &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; Default: &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A value &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; makes the SRX document not compatible with strict SRX implementations.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;okpsrx:options trimLeadingWhitespaces=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== trimTrailingWhitespaces ====&lt;br /&gt;
&lt;br /&gt;
This extension indicates that trailing white spaces in the segments should be moved out of the segment.&lt;br /&gt;
&lt;br /&gt;
Possible values: &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; Default: &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A value &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; makes the SRX document not compatible with strict SRX implementations.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;okpsrx:options trimTrailingWhitespaces=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== oneSegmentIncludesAll ====&lt;br /&gt;
&lt;br /&gt;
This extension indicates that when an entry (text unit) is composed of a single segment after the segmentation has been applied, that segment must include all the content of the entry, for example overriding the trimming extensions.&lt;br /&gt;
&lt;br /&gt;
Possible values: &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; Default: &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A value &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; makes the SRX document not compatible with strict SRX implementations.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;okpsrx:options oneSegmentIncludesAll=&amp;quot;yes&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== sample ====&lt;br /&gt;
&lt;br /&gt;
This extension allows you to store a sample text in the SRX document. That text can be used to what segmentation results from applying the rules of the document.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;language=&amp;quot;yes|no&amp;quot;&amp;lt;/code&amp;gt; attribute indicates the language code to use when applying the rules on the sample.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;useMappedRules=&amp;quot;yes|no&amp;quot;&amp;lt;/code&amp;gt; attributes indicates if all languages rules for the given language should be applied on the sample. If the value is &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; only the language rules currently displayed should be used.&lt;br /&gt;
&lt;br /&gt;
Defaults: Empty sample text, language: en, useMappedRules: yes&lt;br /&gt;
&lt;br /&gt;
This extension does not affect the compatibility of your rules.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;okpsrx:sample&lt;br /&gt;
  language=&amp;quot;en&amp;quot;&lt;br /&gt;
  useMappedRules=&amp;quot;no&amp;quot;&lt;br /&gt;
 &amp;gt;Mr. Holmes is from the U.K.&amp;lt;/okpsrx:sample&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== rangeRule ====&lt;br /&gt;
&lt;br /&gt;
This extension indicates that the specified regular expression patter should be searched on the text unit being segmented and if found, a segment corresponding to the matching content should be made a segment, overriding normal segmentation rules.&lt;br /&gt;
&lt;br /&gt;
This is useful for example in content where you may have a great number of inline codes mixed with no-translatable text and translatable text where using normal rules is too complicated.&lt;br /&gt;
&lt;br /&gt;
A non-empty content makes the SRX document not compatible with strict SRX implementations (if the specified pattern occurs in the text being segmented).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;okpsrx:rangeRule&amp;gt;thePattern&amp;lt;/okpsrx:rangeRule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Segmentation]] [[Category:SRX]]&lt;/div&gt;</summary>
		<author><name>Ysavourel</name></author>
	</entry>
</feed>