Jirka Kosek | 1 Nov 2011 11:55
Picon
Favicon
Gravatar

Re: DocBook to PDF conversion with total page count

On 27.10.2011 17:10, Hussein Shafie wrote:
> On 10/27/2011 02:48 PM, Gilles Gosuin wrote:
>> Unfortunately, this method does not work when you have multiple flows.
> 
> I think I understand: you need the *absolute* total page count of your 
> document.

Usual approach to this problem is to run whole XSLT transformation/FO
processing twice. During second pass you can invoke iText
(http://itextpdf.com/) library from XSLT and get total number of pages
from the PDF file generated during the first pass.

				Jirka

--

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka <at> kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------


--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
(Continue reading)

Hussein Shafie | 1 Nov 2011 15:43
Favicon

Re: Managing preferences

C. Ridd wrote:
>
> We're using XXE Pro 5 very happily with no real problems.
>
> However we do have a problem with our workflow, and I'm wondering if you
> could suggest a way out?
>
> Our Docbook manuals are committed into a version control system and
> changes are sent around for review with 'diffs' showing the actual changes.
>
> The issue we have is that sometimes the diffs don't make any sense,
> because one user has XXE configured to save long lines, not use SGML
> compatibility, not encode certain characters as entities, indent
> differently, etc. Everyone has /slightly/ different settings.
>
> Is there any way to force XXE to save certain documents with particular
> settings, without forcing a user to change their personal settings?

--> The less intrusive way to do that is to customize the DocBook 
configuration by adding a <saveOptions> configuration element. Simple 
example:

cfg:saveOptions addOpenLines="true"
                 encoding="ISO-8859-1"/>

Do not hesitate to specify in this element a value for each possible 
save option.

If a user has not checked the "Override settings specified in config. 
files" in Options|Preferences, Save section (which is almost always the 
(Continue reading)

Gregg Reynolds | 2 Nov 2011 12:22

os x lion catalog.xml fail?

Hi,

I'm trying to work with DDI and running into a couple of problems.

On windows, I get xml.xsd errors (duplicate attributes).  The DDI
distro contains xsd files for xhtml; three of those files contain:

    <xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="../xml.xsd">

Changing ../xml.xsd to xml.xsd fixed the problem, but I'd like to
handle it in an xml catalog so I don't have to edit the distro files.
Tried a bunch of stuff but couldn't get it to work; any suggestions?

The second problem I'm having is on OS X 10.7.2 - it doesn't seem to
be reading my catalog.xml, or it's failing silently.  The xml doc
starts like this:

<DDIInstance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="ddi:instance:3_1 instance.xsd"
    xmlns="ddi:instance:3_1"

My addon catalog uses nextCatalog to refer to a ddi catalog that says

  <uri name="ddi:instance:3_1" uri="XMLSchema/instance.xsd"/>

This works on Windows XP, but on the mac I get a doc type error:

         /{http://www.w3.org/2001/XMLSchema}schema[1]/{http://www.w3.org/2001/XMLSchema}import[1]:
cannot load schema document
(Continue reading)

Hussein Shafie | 2 Nov 2011 14:25
Favicon

Re: os x lion catalog.xml fail?

First of all, please make sure that you have disabled some of the caches 
used to speed up XXE's startup time.

Excerpts from "XMLmind XML Editor - Configuration and Deployment, 
Writing a configuration file for XXE" -- 
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/config_file.html
---
Important

If you are writing a configuration file for XXE, please do not forget to 
temporarily disable the Quick Start and Schema caches by unchecking the 
corresponding checkboxes in Options → Preferences, Advanced|Cached Data 
section. More information about these caches in Section 5.11.1, “Cached 
data options” in XMLmind XML Editor - Online Help.
---

See 
http://www.xmlmind.com/xmleditor/_distrib/doc/help/advancedOptions.html#cacheOptions

On 11/02/2011 12:22 PM, Gregg Reynolds wrote:
>
> I'm trying to work with DDI and running into a couple of problems.
>
> On windows, I get xml.xsd errors (duplicate attributes).  The DDI
> distro contains xsd files for xhtml; three of those files contain:
>
>      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
> schemaLocation="../xml.xsd">
>
> Changing ../xml.xsd to xml.xsd fixed the problem, but I'd like to
(Continue reading)

Gregg Reynolds | 2 Nov 2011 17:20

Re: os x lion catalog.xml fail?

On Wed, Nov 2, 2011 at 8:25 AM, Hussein Shafie <hussein <at> xmlmind.com> wrote:
> First of all, please make sure that you have disabled some of the caches
> used to speed up XXE's startup time.

Yep.  By the way, I haven't used xxe for a while; the new version is
/much/ faster.
...
>> On windows, I get xml.xsd errors (duplicate attributes).  The DDI
>> distro contains xsd files for xhtml; three of those files contain:
>>
>>     <xs:import namespace="http://www.w3.org/XML/1998/namespace"
>> schemaLocation="../xml.xsd">
>>
>> Changing ../xml.xsd to xml.xsd fixed the problem, but I'd like to
>> handle it in an xml catalog so I don't have to edit the distro files.
>> Tried a bunch of stuff but couldn't get it to work; any suggestions?
...
> [2] I don't see why specifying:
>
> <uri name="../xml.xsd" uri="COPY_OF_xml.xsd_RELATIVE_TO_YOUR_CATALOG" />
>
> in an XML catalog would not work.

The lookup seems to work, based on the catalog lookup log, but I can't
tell from the log which actual file gets loaded (the message is just
"resolveURI(xml.xsd)", but we have three xml.xsd files), and I always
get this error message for xml:lang etc. when using ../xml.xsd for the
schemaLocation::

* file:/h:/xml/schema/DDI_3_1/XMLSchema/instance.xsd:43:40: duplicate
(Continue reading)

Gregg Reynolds | 2 Nov 2011 17:24

Re: os x lion catalog.xml fail?

On Wed, Nov 2, 2011 at 8:25 AM, Hussein Shafie <hussein <at> xmlmind.com> wrote:
> First of all, please make sure that you have disabled some of the caches
> used to speed up XXE's startup time.

Forgot to mention, this is xxe 5.0.0, java 1.6.0_21 launched from a
mintty session on winxp.

-gregg

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Hussein Shafie | 2 Nov 2011 20:33
Favicon

Re: os x lion catalog.xml fail?

On 11/02/2011 05:20 PM, Gregg Reynolds wrote:
> ...
>>> On windows, I get xml.xsd errors (duplicate attributes).  The DDI
>>> distro contains xsd files for xhtml; three of those files contain:
>>>
>>>      <xs:import namespace="http://www.w3.org/XML/1998/namespace"
>>> schemaLocation="../xml.xsd">
>>>
>>> Changing ../xml.xsd to xml.xsd fixed the problem, but I'd like to
>>> handle it in an xml catalog so I don't have to edit the distro files.
>>> Tried a bunch of stuff but couldn't get it to work; any suggestions?
> ...
>> [2] I don't see why specifying:
>>
>> <uri name="../xml.xsd" uri="COPY_OF_xml.xsd_RELATIVE_TO_YOUR_CATALOG" />
>>
>> in an XML catalog would not work.
>
> The lookup seems to work, based on the catalog lookup log, but I can't
> tell from the log which actual file gets loaded (the message is just
> "resolveURI(xml.xsd)", but we have three xml.xsd files), and I always
> get this error message for xml:lang etc. when using ../xml.xsd for the
> schemaLocation::
>
> * file:/h:/xml/schema/DDI_3_1/XMLSchema/instance.xsd:43:40: duplicate
> attribute declaration "xml:base" [sch-props-correct.2]
>
> Ditto for xml:lang, xml:space, and xml:specialAttrs
>
> I get this no matter what I do in the catalog, e.g.
(Continue reading)

Philippe Nobili | 3 Nov 2011 14:57
Favicon

Re: Improving the selection/caret management ?

M. Shafie,

We brought this subject once as a simple suggestion for improvement. We try to summarize our problem below for recap, we hope this helps you to understand our problem.

+ We have 2 different views (top & bottom)

    = the topmost view displays a hierarchical graph of nodes (collapsible procedures and parameters)
    = the bottommost view displays only the help section for each node (either a simple text area, or a strict-XHTML node sequence.

 + When we select an element from the topmost view (the tree-view), the selection mechanism of XXE allows the help for this element to be immediately accessible in the bottom view.

    This is illustrated for element smooth in select_param.jpg

This works very well for all siblings, or when crossing hierarchical boundaries, and allows a very productive documentation authoring for our graph call.

+ However, when a parent of the current node is selected, the selection is enlarged, but since the selected element falls within the visible area, the view is not scrolled and stays focused on the previously selected element (smooth).

  This is illustrated for element matching (smooth's parent) in select_procedure.jpg.

  In this case, editing becomes cumbersome and requires to scroll upward or downward the bottom view in order to retrieve the element to be edited.

__________________________________________________________

Our suggestion would be to scroll the view at the top of the selected element when it falls outside the view (instead of doing nothing). Would it make sense  to do so ?

many thanks,
Philippe.

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Hussein Shafie | 4 Nov 2011 09:41
Favicon

Re: Improving the selection/caret management ?

On 11/03/2011 02:57 PM, Philippe Nobili wrote:
>
> We brought this subject once as a simple suggestion for improvement. We
> try to summarize our problem below for recap, we hope this helps you to
> understand our problem.
>
> + We have 2 different views (top & bottom)
>
> = the topmost view displays a hierarchical graph of nodes (collapsible
> procedures and parameters)
> = the bottommost view displays only the help section for each node
> (either a simple text area, or a strict-XHTML node sequence.
>
> + When we select an element from the topmost view (the tree-view), the
> selection mechanism of XXE allows the help for this element to be
> immediately accessible in the bottom view.
>
> This is illustrated for element *smooth* in *select_param.jpg*
>
> This works very well for all siblings, or when crossing hierarchical
> boundaries, and allows a very productive documentation authoring for our
> graph call.
>
> + However, when a parent of the current node is selected, the selection
> is enlarged, but since the selected element falls within the visible
> area, the view is not scrolled and stays focused on the previously
> selected element (*smooth*).
>
> This is illustrated for element *matching* (*smooth*'s parent) in
> *select_procedure.jpg*.
>
> In this case, editing becomes cumbersome and requires to scroll upward
> or downward the bottom view in order to retrieve the element to be edited.

Your explanations are perfectly clear.

>
> __________________________________________________________
>
> Our suggestion would be to scroll the view at the top of the selected
> element when it falls outside the view (instead of doing nothing). Would
> it make sense to do so ?
>

Sure.

We'll *try* to implement this enhancement in forthcoming v5.1, which 
should be released within a couple of weeks. However, I cannot give you 
my word that we'll have the time to do that for v5.1.

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Philippe Nobili | 4 Nov 2011 09:47
Favicon

Re: Improving the selection/caret management ?


> Sure.
>
> We'll *try* to implement this enhancement in forthcoming v5.1, which
> should be released within a couple of weeks. However, I cannot give you
> my word that we'll have the time to do that for v5.1.
>
We perfectly understand this; many thanks for your very efficient support.
Best regards.

 
--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support


Gmane