On 02/23/2012 11:29 AM, Jirka Kosek wrote:
>
> please find attached patch for making folio prefixes work.

Thanks.

Note that we have not the slightest idea of who could need folio 
prefixes (page numbers with chapter/appendix number prefix). Law books?

Moreover we are not sure that folio prefixes (an XSL 1.1 feature?) are 
supported by XSL-FO processors other than Antenna House.

Therefore we cannot guarantee that we'll support this feature in the 
next release of ditac.

After reviewing all the code you sent us and after re-reading the dozen 
RFEs sent by other users and customers, we'll specify the exact set of 
new features which will be implemented in the next release of ditac. Of 
course, we'll keep you informed.



>
> I'm not sure whether my approach for extracting chapter/appendix number
> is the best, but I have failed to use functions like
> u:titlePrefixSegments() which probably can provide some help.

Don't worry. We do not intend to copy your code --as good as it can be-- 
as is. If we find something simpler, we'll slightly change it.




>
> Just out of curiosity -- is there any reason for using your Java
> implementation of Number:format() instead of using directly
> <xsl:number/>  or making XSLT function for accessing<xsl:number/>?
>

We didn't see how one could use <xsl:number/>, an XSLT element, in the 
context of XSLT utility functions such as those found in xsl/common/.

Function format-number() did not seem useful for our needs.

We'll of course get rid of Number:format() now that we've learned this 
trick:

http://www.w3.org/TR/xslt20/#stylesheet-functions
---
Example: Declaring the Return Type of a Function

The following example illustrates the use of the as attribute in a 
function definition. It returns a string containing the representation 
of its integer argument, expressed as a roman numeral. For example, the 
function call num:roman(7) will return the string "vii". This example 
uses the xsl:number instruction, described in 12 Numbering. The 
xsl:number instruction returns a text node, and the function conversion 
rules are invoked to convert this text node to the type declared in the 
xsl:function element, namely xs:string. So the text node is atomized to 
a string.

<xsl:function name="num:roman" as="xs:string">
   <xsl:param name="value" as="xs:integer"/>
   <xsl:number value="$value" format="i"/>
</xsl:function>
---


---
References:

http://www.w3.org/TR/xsl11/#fo_folio-prefix

http://www.w3.org/TR/xslt20/#number

http://www.w3.org/TR/xslt20/#format-number
 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to