John L. Clark | 2 May 2005 23:26
Picon

Cropped images in DocBook and scalefit="1"

With the DocBook configuration shipped with the XMLmind XML Editor
(XXE), images (referenced from within imagedata elements) that are wider
than the width of the document view are clipped on the right and the
left.  It seems that the red selection rectangle indicates the boundary
of the viewport (as described in "DocBook: The Definitive Guide" and in
the "Support of images in DocBook" document shipped with XXE).  Without
any view-adjusting attributes, it further seems that the width of the
viewport (that is, the width of the selector when an imagedata element
is selected) is equal to the width of the document view.  As such, I
thought that I could simply set the scalefit attribute to "1" to cause
the image to be scaled (down) to fit within this "default" viewport.
However, setting this attribute (by itself, in a case such as this) does
nothing - the image is still clipped.  What am I missing here?

Also, while I'm asking, what are the defaults for the various
view-generating properties that XXE imposes?  "DocBook: The Definitive
Guide" says, at several points, that "an implementation is free to
choose defaults"; I'm simply curious what defaults XXE chooses for the
various properties (depth, width, one when only the other is defined,
etc.).

Take care,

    John L. Clark

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

Kenneth Johansson | 2 May 2005 15:35
Picon

Adding extra toplevel menu

Hi,
 
I'm trying to add an extra menu that should be available next to the Docbook menu. It's a simple menu which has a lot of product names that the writer can insert. I've included a file with my menu and added it to docbook.xxe:
 
  <load location="docbook.jar" />
  <help location="docbook_help.jar" />
  <include location="common.incl" />
  <include location="xslMenu.incl" />
  <include location="toolBar.incl" />
  <include location="products.incl" />
 
This works fine but now the "DocBook" menu is removed, and if I move the inclusion up above common.incl the DocBook menu is visible but my menu is gone. What am I doing wrong?
 
/Kenneth
 

--------------------------------------------------------
Kenneth Johansson       Technical Documentation Manager
Sectra Imtec AB
Teknikringen 20         E-mail: ke-joh AT sectra DOT se
SE-583 30 Linköping     Phone:  +46 13 23 52 00
SWEDEN                  Web:    http://www.sectra.se

 

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Madlik Monika | 3 May 2005 09:03
Picon
Favicon

deleting inline-styles

Hello,

 

I programmed a macro, which inserts the inline-style „bold“ to a selected word. Now I’d like to write another macro, with which a user is able to delete such an inline-style (so the macro has to remove tags in the xml-file). Is this possible?

 

Kind regards,

Monika


--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Kevin Flynn | 3 May 2005 14:34

Catalog question

I'm trying to get XXE catalog support to work for and have more or less succeeded but have one minor problem:
 
All my documents include a reference to an external entity which has <local-config> as its root element. The document the entity refers to does not have a fixed name or location, so the entity declaration uses a "SYSTEM" relative URL.
 
In order to be able to edit the <local-config> document on its own, I have defined an XXE config file containing entries to associate it with a DTD and CSS file:
 
<configuration
xsi:schemaLocation="http://www.xmlmind.com/xmleditor/schema/configuration ../configuration/xsd/configuration.xsd"
name="Ayuda Config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
  <detect>
      <and>
            <rootElementLocalName>local-config</rootElementLocalName>
            <fileNameExtension>ayu</fileNameExtension>
      </and>
  </detect>
  <dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"/>
  <css name="Ayuda" location="../../css/ayuda-cfg.css" />
</configuration>
 
This seems to work fine if I open the document directly in XXE. However, if I select the <local-config> element in a referencing document and then select Edit -> Document Reference, the "Edit Referenced Document" option is disabled. In my old set up, where all entity and DTD references were defined using "SYSTEM" relative URLs, this option worked.
 
I hope I have explained this well enough. Do you have any advice?
 
Regards,
 
Kevin Flynn
Birdstep Technology ASA
Oslo, Norway
+47 93433942
 

--
XMLmind XML Editor Support List
xmleditor-support <at> xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
Hussein Shafie | 4 May 2005 09:34
Picon

Re: deleting inline-styles

Madlik Monika wrote:
> I programmed a macro, which inserts the inline-style „bold“ to a 
> selected word. Now I’d like to write another macro, with which a user is 
> able to delete such an inline-style (so the macro has to remove tags in 
> the xml-file). Is this possible?

For the opposite operation, there is no need to write a macro. Command 
"convert" with parameter "[implicitElement] #text" will do the job.

See http://www.xmlmind.com/xmleditor/_distrib/docs/commands/ch06s07.html

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

Hussein Shafie | 4 May 2005 09:42
Picon

Re: Adding extra toplevel menu

Kenneth Johansson wrote:
> I'm trying to add an extra menu that should be available next to 
> the Docbook menu. It's a simple menu which has a lot of product names 
> that the writer can insert. I've included a file with my menu and added 
> it to docbook.xxe:
>  
>   <load location="docbook.jar" />
>   <help location="docbook_help.jar" />
>   <include location="common.incl" />
>   <include location="xslMenu.incl" />
>   <include location="toolBar.incl" />
>   <include location="products.incl" />
>  
> This works fine but now the "DocBook" menu is removed, and if I move the 
> inclusion up above common.incl the DocBook menu is visible but my menu 
> is gone. What am I doing wrong?

There is currently no way to add an extra menu which would be next to 
the DocBook menu. This feature is planned for V3.

The best you can do for now is to add a submenu to the DocBook menu.

This is very simple to do and  is explained here:
http://www.xmlmind.com/xmleditor/_distrib/docs/configure/ch04s02s03.html

Note that what is said there for the toolbar:

http://www.xmlmind.com/xmleditor/_distrib/docs/configure/ch06s24.html

also applies to the ``XML menu'' (concept: a placeholder which may be 
replaced by a document type specific menu):

http://www.xmlmind.com/xmleditor/_distrib/docs/configure/ch06s14.html

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

Hussein Shafie | 4 May 2005 10:06
Picon

Re: Catalog question

Kevin Flynn wrote:
> I'm trying to get XXE catalog support to work for and have more or less 
> succeeded but have one minor problem:
>  
> All my documents include a reference to an external entity which has 
> <local-config> as its root element. The document the entity refers to 
> does not have a fixed name or location, so the entity declaration uses a 
> "SYSTEM" relative URL.
>  
> In order to be able to edit the <local-config> document on its own, I 
> have defined an XXE config file containing entries to associate it with 
> a DTD and CSS file:
>  
> <configuration
> xsi:schemaLocation="http://www.xmlmind.com/xmleditor/schema/configuration 
> ../configuration/xsd/configuration.xsd"
> name="Ayuda Config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
> xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
>   <detect>
>       <and>
>             <rootElementLocalName>local-config</rootElementLocalName>
>             <fileNameExtension>ayu</fileNameExtension>
>       </and>
>   </detect>
>   <dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"/>
>   <css name="Ayuda" location="../../css/ayuda-cfg.css" />
> </configuration>
>  
> This seems to work fine if I open the document directly in XXE. However, 
> if I select the <local-config> element in a referencing document and 
> then select Edit -> Document Reference, the "Edit Referenced Document" 
> option is disabled. In my old set up, where all entity and DTD 
> references were defined using "SYSTEM" relative URLs, this option worked.
>  
> I hope I have explained this well enough. Do you have any advice?
>  

--> First of all, your XXE configuration is invalid. Open it in XXE (or 
use xsdvalid) and you'll see that the <dtd> configuration element has a 
"systemId" required attribute.

Change:

---
<dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"/>
---

to:

---
<dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"
      systemId="my/local/copy/ayuda.dtd"/>
---

--> Now, this being said, I'm not sure the disabled "Edit Referenced 
Document" is related to the above problem.

Generally when "Edit Referenced Document" is disabled, it means that 
<local-config> element simply does not represent an external document 
module.

XXE may have flattened your document when it has opened it. You need to 
use Options|Options, Open Tab and check toggle "Warn about loss of 
physical structure" to get a warning.

In order to help you more, I need to see a master document referencing a 
<local-config> module and having the problem you describe.

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

Hussein Shafie | 4 May 2005 11:08
Picon

Re: Cropped images in DocBook and scalefit="1"

John L. Clark wrote:
> With the DocBook configuration shipped with the XMLmind XML Editor
> (XXE), images (referenced from within imagedata elements) that are wider
> than the width of the document view are clipped on the right and the
> left.  It seems that the red selection rectangle indicates the boundary
> of the viewport (as described in "DocBook: The Definitive Guide" and in
> the "Support of images in DocBook" document shipped with XXE).  Without
> any view-adjusting attributes, it further seems that the width of the
> viewport (that is, the width of the selector when an imagedata element
> is selected) is equal to the width of the document view.  As such, I
> thought that I could simply set the scalefit attribute to "1" to cause
> the image to be scaled (down) to fit within this "default" viewport.
> However, setting this attribute (by itself, in a case such as this) does
> nothing - the image is still clipped.  What am I missing here?

There is no default viewport and without a viewport, scalefit has no effect.

You can achieve what you want simply by setting attribute "width" to 
"100%" (because in such case scalefit=1 is implicit).

> Also, while I'm asking, what are the defaults for the various
> view-generating properties that XXE imposes?  "DocBook: The Definitive
> Guide" says, at several points, that "an implementation is free to
> choose defaults"; I'm simply curious what defaults XXE chooses for the
> various properties (depth, width, one when only the other is defined,
> etc.).

The DocBook CSS style sheet uses an image gadget which derives from 
(more generic image gadget) image-viewport.

Image-viewport defaults are found in 
http://lupo/xmleditor/_distrib/docs/csssupport/ch05s22.html

Note that, in this documentation, the default values of parameters 
viewport-width, viewport-height, content-width and content-height are 
not accurate. We'll change this description to: "None." in next release.

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

Kevin Flynn | 4 May 2005 11:00

RE: Catalog question

You are quite right on all counts:

>First of all, your XXE configuration is invalid. Open it in XXE (or
>use xsdvalid) and you'll see that the <dtd> configuration element has >a
"systemId" required attribute.

Yes, I'd actually removed the systemId while I was experimenting (on the
basis that I don't actually need it since I'm using catalogs).

>Now, this being said, I'm not sure the disabled "Edit Referenced
>Document" is related to the above problem.

Also true: XXE tolerates the missing system ID very nicely

>XXE may have flattened your document when it has opened it.

Well, you weren't quite right here - I'd actually inadvertently done it
myself with an XSL transformation.

Thanks very much for your help and sorry for wasting your time!

Kevin Flynn

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

John L. Clark | 4 May 2005 16:22
Picon

Re: Cropped images in DocBook and scalefit="1"

On Wed, May 04, 2005 at 11:08:10AM +0200, Hussein Shafie wrote:
> There is no default viewport and without a viewport, scalefit has no effect.
> 
> You can achieve what you want simply by setting attribute "width" to 
> "100%" (because in such case scalefit=1 is implicit).

The problem that my authors have described is that their images are
being cropped (by the XXE interface) when they are larger than the width
of the page; they only want to scale their images in order to fit them
within the page.  If the page width is large enough, they want these
images displayed at their intrinsic size.

I have described to them the use of the width attribute, but this (with
scalefit="1") causes the images to always be scaled to exactly the width
of the XXE document display, which often causes images to be enlarged,
with significant quality loss.

I think the clipping of images in XXE is a poor feature, and would like
to request a feature enhancement that a default viewport be set for
images with a value either equal to the intrinsic size of the image
(which might force the document to be scrolled in order to see the whole
image) or equal to the scaled height and width of an image in order to
fit it in the width of the document display.

> The DocBook CSS style sheet uses an image gadget which derives from 
> (more generic image gadget) image-viewport.
> 
> Image-viewport defaults are found in 
> http://lupo/xmleditor/_distrib/docs/csssupport/ch05s22.html

I'm pretty sure that's not web-accessible.  ;-)

> Note that, in this documentation, the default values of parameters 
> viewport-width, viewport-height, content-width and content-height are 
> not accurate. We'll change this description to: "None." in next release.

Interestingly, if this documentation *were* accurate it would meet my
request for enhancement above.  Also, I thought that I remembered a past
version of XXE where images did get scaled if they were too wide, by
default.  That's what I want.

Take care,

    John L. Clark

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

Gmane