<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.rws.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How do I get correct values from the %refpage variable and partial (Range+) composition?</title><link>https://community.rws.com/product-groups/contenta-portfolio/contenta_publishing_suite/f/xpp_forum/30610/how-do-i-get-correct-values-from-the-refpage-variable-and-partial-range-composition</link><description>XPP 9.3.1, using XML mode (without CSS) and the Looseleaf add-on 
 We have a situation where we need to display the number of pages between the current page and some specific forward destination. The way that we currently implement this is by putting</description><dc:language>en-US</dc:language><generator>Telligent Community 12 Non-Production</generator><item><title>RE: How do I get correct values from the %refpage variable and partial (Range+) composition?</title><link>https://community.rws.com/thread/100397?ContentTypeID=1</link><pubDate>Sat, 08 Aug 2020 11:58:14 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:99e59fe4-d9f6-4c79-94a7-df197a05b286</guid><dc:creator>Bart Terryn</dc:creator><description>&lt;p&gt;Cheran,&lt;/p&gt;
&lt;p&gt;As Jonathan explained to you, compose will not solve your problem if you want to continue to use compose range pages.&lt;/p&gt;
&lt;p&gt;But there is always xyPerl that can help you.&lt;br /&gt;You could write out the relative page number of your (end-1?) reference point(s) into a file.&lt;br /&gt;And then use that value to calculate how many pages you are away from that point.&lt;/p&gt;
&lt;p&gt;You will still need to do at least 2 composes to get the correct answer.&lt;br /&gt;But once the end point is set, you can do any compose you like, you will get the correct answer.&lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;
&lt;p&gt;Bart&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I get correct values from the %refpage variable and partial (Range+) composition?</title><link>https://community.rws.com/thread/100392?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 20:14:24 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:a740f6f1-6fc1-4926-9fa1-a6c664c4b6b5</guid><dc:creator>Cheran Shunmugavel</dc:creator><description>&lt;p&gt;Jonathan,&lt;/p&gt;
&lt;p&gt;Thanks for the detailed response. We are indeed using Auto-looseleaf, and we do have &amp;quot;Compose Changed Cross-References&amp;quot; set to &amp;quot;yes&amp;quot;. I must not have been paying close enough attention during my auto-looseleaf tests, because it is getting the correct page number. I can also see that doing &amp;quot;Xref Errors&amp;quot; after the Range+ compose also gets the page numbers that I expect to see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I get correct values from the %refpage variable and partial (Range+) composition?</title><link>https://community.rws.com/thread/100370?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 14:08:37 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:2f2cd7bc-a616-4124-a3ec-f0454b4c27bf</guid><dc:creator>Jonathan Dagresta</dc:creator><description>&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Hi Cheran,&lt;/p&gt;
&lt;p&gt;Due to the way that the composition engine works, the %refpage value will not always be correct when you are not composing the whole division (and with forward references you may even need to compose the whole division twice).&lt;/p&gt;
&lt;p&gt;Details: the pages being composed are made into a separate &amp;quot;input stack&amp;quot; that is composed, and that affects the in-progress page numbers. Even if composition tried to do a better job of accounting for this in the page numbers saved for &amp;lt;rx&amp;gt;/&amp;lt;rf&amp;gt;, while the composition is in progress it will never be able to fully account for cases where there are forward references and e.g. the compose Range+ operation might result in fewer pages or more pages (before the &amp;lt;rx&amp;gt; occurs).&lt;/p&gt;
&lt;p&gt;It&amp;#39;s the purpose of the Compose Xrefs function (compose -sx for command-line or Xref Errors from compose menu), that is performed after the &amp;quot;regular&amp;quot; composition is done (and all the composed pages are reassembled back with the other pages), to account for this and &amp;quot;fix up&amp;quot; (or recompose) the lines with &amp;lt;rf&amp;gt; macros on them.&lt;/p&gt;
&lt;p&gt;So in your Range+ testing (outside of Looseleaf), try doing the &amp;quot;Xref Errors&amp;quot; composition after you do the Range+ composition and see if that doesn&amp;#39;t get you the desired results.&lt;/p&gt;
&lt;p&gt;In Looseleaf mode (and I assume you mean Auto-looseleaf), if you have the &amp;quot;Compose Changed Cross-References&amp;quot; field in the ALL spec set to &amp;#39;yes&amp;#39; then Looseleaf composition will perform the Compose Xrefs function on just the composed pages (after it is done with the Looseleaf composition of them).&lt;/p&gt;
&lt;p&gt;Hopefully that will help you get the desired results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jonathan Dagresta&lt;br /&gt;SDL XPP Engineering&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>