Philippe Nobili | 1 Jun 13:17 2009

Re: Adding chapter numbers to section numbers



Hussein Shafie wrote:
Mary Anne Rosato wrote:
We are creating some large, multi-chapter technical documentation, and the client requested that chapter numbers be added to the section numbers to alleviate confusion about what chapter people are in. How is this done?
My answer assume that you are talking about DocBook documents. --> If you want to change what the authors see on screen, you need to customize the DocBook CSS style sheets.

Mary Anne,

We did the following changes in the CSS file used by the styled view. It adds parent numbers (chapters or appendices) to child section number and allow authors to have a better understanding of their document structure.

We hope this helps,
Best.

/*
   Change the way parts, chapters and sections are numbered. Differenciate
   article, where there are no chapters, and books
*/

/*
   For chapters, number the sections using the parent chapter
   number. (1.1, 1.2,...)
*/

chapter  sect1   > title:first-child:before ,
chapter  section > title:first-child:before {
 
    content: collapser() " " simple-counter(nn-) " ";
}

chapter  sect1    sect2   > title:first-child:before ,
chapter  section  section > title:first-child:before {
 
    content: collapser() " " simple-counter(nnn-) " ";
}

/*
   For appendices, do the same thing, but use two different
   counters, as appendices are numbered using upper-latin
*/

appendix sect1   > title:first-child:before ,
appendix section > title:first-child:before {
 
    content: collapser() " " simple-counter(n--,upper-latin) "." simple-counter(
-n-) " ";
}

appendix sect1    sect2   > title:first-child:before ,
appendix section  section > title:first-child:before {
 
    content: collapser() " " simple-counter(n---,upper-latin) "." simple-counter
(-nn-) " ";
}

Attachment (philippe_nobili.vcf): text/x-vcard, 329 bytes

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Jana Škopová | 1 Jun 15:43 2009
Picon

(bez předmětu)

Hello,
our company would like to buy Xml mind editor, but before we need to 
know does it able following things:

    * is it possible to import image into page header?
    * how to recognise a page number into editor?
    * does it recognise even and odd pages?
    * is it possible - in case that title will be at the end of the page
      to set up titles at the begining of the new page?

In this moment we are using Microsoft word for our company 
documentations. But we finded Word very unreliable. But we would like to 
saved
appearance of our documentations. Therefore we need this things abow. We 
want to converted our xml into pdf files. So your product is perfect for 
us. And we red a lot of  recommendations on internet.

Thank you for your help

Great regards

Jana Skopova
Ales s.r.o.
Czech Republic

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

Hussein Shafie | 2 Jun 11:35 2009

Re: (bez předmětu)

Jana Škopová wrote:
> our company would like to buy Xml mind editor, but before we need to 
> know does it able following things:
> 
>     * is it possible to import image into page header?
>     * how to recognise a page number into editor?
>     * does it recognise even and odd pages?
>     * is it possible - in case that title will be at the end of the page
>       to set up titles at the begining of the new page?
> 

The editor is just an authoring tool. For the convenience of authors, we 
have a "Convert Document" menu which allows to convert a 
DocBook/XHTML/DITA document to other formats (PDF, HTML, RTF, etc).

However XMLmind XML Editor does not perform these conversions itself. 
Instead it relies to a set of XSLT style sheets in order to perform 
these conversions.

The tasks you have listed cannot be performed from within XMLmind XML 
Editor. However the answers to all your questions is YES, provided that 
you customize the XSLT style sheets to suit your needs.

More information in "How do I customize the HTML, PDF, RTF, etc, 
generated using the "Convert Document" menu?" -- 
http://www.xmlmind.com/xmleditor/faq.html#custom_deliverables

See also XMLmind XML Editor - Customization Service --
http://www.xmlmind.com/xmleditor/customization_service.html

 
--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Boris Goldowsky | 2 Jun 14:16 2009

StackOverflowError

I'm trying to set up an addon for editing using a complex RelaxNG
schema.  When XXE tries to load the schema, however, it is hitting an
exception:

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
	at com.xmlmind.xml.rng.validate.Pattern.samePattern(Pattern.java:39)
	at
com.xmlmind.xml.rng.validate.OneOrMorePattern.samePatternAs(OneOrMorePattern.java:37)
	at com.xmlmind.xml.rng.validate.Pattern.samePattern(Pattern.java:39)
	at
com.xmlmind.xml.rng.validate.ListPattern.samePatternAs(ListPattern.java:30)
	
and so forth for many more lines.

This happens with many (but not all) of a family of schemas that are in
development, for instance those available here:

http://www.daisy.org/z3986/2010/auth/profiles/book/0.3/z3986a-book.html

Under "Informative Schemata" there is a single-file version of the
schema that is convenient to test with, called z3986a-book.single.rng .

I am not sure if this is a bug in XXE or a bug in the schema; but I am
told that the schema works fine in Oxygen.  I would love to be able to
make it work in XXE as well.

Bng

--

-- 
Boris Goldowsky <bgoldowsky <at> cast.org>

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

Hussein Shafie | 2 Jun 15:36 2009

Re: StackOverflowError

Boris Goldowsky wrote:
> I'm trying to set up an addon for editing using a complex RelaxNG
> schema.  When XXE tries to load the schema, however, it is hitting an
> exception:
> 
> Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
> 	at com.xmlmind.xml.rng.validate.Pattern.samePattern(Pattern.java:39)
> 	at
> com.xmlmind.xml.rng.validate.OneOrMorePattern.samePatternAs(OneOrMorePattern.java:37)
> 	at com.xmlmind.xml.rng.validate.Pattern.samePattern(Pattern.java:39)
> 	at
> com.xmlmind.xml.rng.validate.ListPattern.samePatternAs(ListPattern.java:30)
> 	
> and so forth for many more lines.
> 
> This happens with many (but not all) of a family of schemas that are in
> development, for instance those available here:
> 
> http://www.daisy.org/z3986/2010/auth/profiles/book/0.3/z3986a-book.html
> 
> Under "Informative Schemata" there is a single-file version of the
> schema that is convenient to test with, called z3986a-book.single.rng .
> 
> 
> I am not sure if this is a bug in XXE or a bug in the schema; but I am
> told that the schema works fine in Oxygen.  I would love to be able to
> make it work in XXE as well.

--> There is no bug in the schema. You can test that with James Clark's
Jing (http://www.thaiopensource.com/relaxng/jing.html) or by running

xmltool validate -s z3986a-book.single.rng

See "The xmltool command-line utility"
http://www.xmlmind.com/xmleditor/_distrib/doc/xmltool/index.html

Note that it is not the *full* *validation* performed by Jing (which has
been integrated in XXE) which causes the StackOverflowError but our own
*incremental* *validation* engine. That's why "xmltool validate" can
work fine while opening the document in XXE can crash and burn.

--> If there is a bug in XXE, then I cannot reproduce it.

I can successfully open and edit attached XML document (sorry but you
didn't send me a real document so I had to quickly assemble one).

Note that a bug related to RELAX NG which caused StackOverflowErrors has
been fixed in 4.3.0 (April 10, 2009):
---
RELAX NG grammars making use of certain recursive content models could
cause XMLmind XML Editor to raise a StackOverflowError.
---
See http://www.xmlmind.com/xmleditor/changes.html

If you are using a version older than v4.3, please test what you do with
v4.3+.

If you manage to reproduce the bug with v4.3+, please send me all the
files allowing me to reproduce the bug and please tell me what I must do
(e.g. select a p and try to add a div after it) in order to reproduce
the bug.

Note that v4.4 should be released next Friday, so we still have the time
to fix the bug in v4.4 (if this bug was not already fixed in v4.3).
Attachment (sample.z3986a-book): text/xml, 2044 bytes

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Boris Goldowsky | 2 Jun 15:54 2009

Re: StackOverflowError

Thank you.  You are correct; I was testing at home and I hadn't updated 
to 4.3 there yet.

I tried again with 4.3.0-pro and all works as expected.

Hussein Shafie wrote:
> --> If there is a bug in XXE, then I cannot reproduce it.
>
> I can successfully open and edit attached XML document (sorry but you
> didn't send me a real document so I had to quickly assemble one).
>
>   
I am always impressed by the extra effort that you put into 
understanding and responding to customer problems.  Thanks again -

Boris

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

Mary Anne Rosato | 2 Jun 21:34 2009

Re: Adding chapter numbers to section numbers

Thanks Hussein, this worked fine.

Regards,
Mary Anne

-----Original Message-----
From: Hussein Shafie [mailto:hussein <at> xmlmind.com] 
Sent: Friday, May 29, 2009 1:28 PM
To: Mary Anne Rosato
Cc: xmleditor-support <at> xmlmind.com
Subject: Re: [XXE] Adding chapter numbers to section numbers

Mary Anne Rosato wrote:
>  
> 
> We are creating some large, multi-chapter technical documentation, and
> the client requested that chapter numbers be added to the section
> numbers to alleviate confusion about what chapter people are in. How is
> this done?
> 
>  
> 

My answer assume that you are talking about DocBook documents.

--> If you want to change what the authors see on screen, you need to
customize the DocBook CSS style sheets.

There is no way to do this from within XMLmind XML Editor.

Normally this kind of customization is done by a consultant (I mean: not
by the technical writer). This consultant must refer to "Replacing an
existing CSS style sheet" --
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/replace_css.html

--> If you want to change what is generated by the "DocBook|Convert
Document" menu, you need to customize the DocBook XSL style sheets.

Fortunately for your specific problem, this can be done from within
XMLmind XML Editor.

Please follow this procedure:

[1] Open a DocBook document.

[2] Select menu item "Options|Customize|Change Document Conversion
Parameters".

[3] Using the "Group of parameters" combobox, select "Convert to PDF,
PostScript".

[4] Click "Add".

[5] Type:

section.label.includes.component.label

in the "Name" field.

Type:

1

in the "Value" field.
(See attached screenshot).

[6] Click OK twice.

Now please convert the DocBook document to PDF and you'll see that the
section numbers include the number of their parent chapter.

The above procedure is done once for all and will survive XMLmind XML
Editor upgrades.

If you need to convert your documents to formats other than PDF or
PostScript, then you need to repeat the procedure but this time, in step
#3, you'll select another format (e.g. "Convert to Multi-page HTML").

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

Philippe Nobili | 3 Jun 17:05 2009

How to cope with SVG embedding bitmaps ?

Dear Mr. Shafie,

It frequently that our DocBook documents reference SVG graphics embedding bitmaps (e.g. to add annotations to whatever screenshots). When this happens, the bitmas  referenced in the SVG file are not copied with other resources (from xslMenu.incl), for example:

<mediaobject><imageobject><imagedata fileref="images/mygraphics.svg" /></imageobject>

mygraphic.svg will be copied, but not the mygraphics.jpg it references: <image id="image1557" xlink:href="mygraphics.jpg"/>

leading to the following error messages during FOP PDF conversion (excerpt):

[FOP ERROR] Error while opening file.
Could not load image from system identifier 'file:/tmp/xxe917718694241510695/resources/mygraphics.jpg' (/tmp/xxe917718694241510695/resources/mygraphics.jpg (No such file or directory))
[

And the image is of course missing on the produced PDF file. 

So far, we could not find any convenient way to fix this issue, apart from using absolute paths in the SVG files -- which is not very practical --, or converting the SVG graphics into bitmaps -- which looses the advantage of using SVG...---. Is there a way to detect these "hidden" resources before  document conversion (i.e. in xslMenu.incl) and copy them into the temporary working directory with all other resources before running the actual XSL conversion ?

Many thanks for your help,
Philippe.




Attachment (philippe_nobili.vcf): text/x-vcard, 329 bytes

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Hussein Shafie | 4 Jun 10:35 2009

Re: How to cope with SVG embedding bitmaps ?

Philippe Nobili wrote:
> 
> It frequently that our DocBook documents reference SVG graphics 
> embedding bitmaps (e.g. to add annotations to whatever screenshots). 
> When this happens, the bitmas  referenced in the SVG file are not copied 
> with other resources (from xslMenu.incl), for example:
> 
> <mediaobject><imageobject><imagedata fileref="images/mygraphics.svg" 
> /></imageobject>
> 
> mygraphic.svg will be copied, but not the mygraphics.jpg it references: 
> <image id="image1557" xlink:href="mygraphics.jpg"/>
> 
> leading to the following error messages during FOP PDF conversion (excerpt):
> 
> [FOP ERROR] Error while opening file.
> Could not load image from system identifier 
> 'file:/tmp/xxe917718694241510695/resources/mygraphics.jpg' 
> (/tmp/xxe917718694241510695/resources/mygraphics.jpg (No such file or 
> directory))
> [
> 
> And the image is of course missing on the produced PDF file. 
> 
> So far, we could not find any convenient way to fix this issue, apart 
> from using absolute paths in the SVG files -- which is not very 
> practical --, or converting the SVG graphics into bitmaps -- which 
> looses the advantage of using SVG...---. Is there a way to detect these 
> "hidden" resources before  document conversion (i.e. in xslMenu.incl)

Yes, if you embed the SVG in the XML document: use configuration element 
documentResources 
(http://www.xmlmind.com/xmleditor/_distrib/doc/configure/documentResources.html). 

No, if you just reference an external SVG file.

> and copy them into the temporary working directory with all other 
> resources before running the actual XSL conversion ?
> 

We used to support references to SVG graphics themselves referencing 
external files in v3 (including in File|Save As) and we definitely 
removed this feature because its implementation was much too complicated 
given its usefulness.

You need to use an SVG editor which allows you to embed external files 
in the SVG by the means of a "data:" URI 
(http://www.ietf.org/rfc/rfc2397.txt).

Actual example (excerpt of a SVG file generated by Inkscape):
---
<image
        xlink:href="data:image/png;base64,iVBOR
        ...
mjBbbCcAAAA AElFTkSuQmCC "
        x="60.840504"
        y="62.153378"
        width="127"
        height="28"
        id="image2591" />
---

FOP, Batik, XEP all support "data:" URI.

(Very) Recent versions of Inkscape (http://www.inkscape.org/) allow to 
do this simply by using an option (Effects|Images|Embed All Images -- 
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Effects-Images.html#Effects-EmbedAllImages). 
We use this Inkscape feature for our own needs.

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

Hussein Shafie | 5 Jun 15:20 2009

[XXE] XMLmind XML Editor 4.4

XMLmind XML Editor Personal Edition 4.4 can be downloaded from
http://www.xmlmind.com/xmleditor/download.shtml

Professional Edition users, please upgrade using this form:
http://www.xmlmind.com/store/download.php

(The above form is usually accessed through
http://www.xmlmind.com/xmleditor/upgrade.html.)
   _____________________________________________

v4.4 (June 5, 2009): Highlights:

  * Sun's ``next generation Java[tm] plug-in''
    can be used to run XMLmind XML Editor
    (Professional Edition only) as an applet.
    See demo:
    http://www.xmlmind.com/xmleditor/xxe_applet.html

  * Integrated support for input methods (e.g.
    Japanese Romaji Input).

  * Several other enhancements make XMLmind XML
    Editor (all editions) more comfortable to use.

More information in
http://www.xmlmind.com/xmleditor/changes.html

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


Gmane