Pages: « 1 2 3 4 5 6 7 8 9 10 »
 71 
 on: September 26, 2016, 10:27:06 AM 
Started by Sebastian - Last post by Markus
Hi Derek,

I have seen that in XMAX 11 the validate_before_export property is supported in the XMAX ini file. Is there an API method that allows to set this property during runtime on the XMAX object? We are using XMAX in a WPF project.

Thanks,
Markus

 72 
 on: September 20, 2016, 05:30:10 PM 
Started by adamm - Last post by Derek Read
I suspect this may not even a DITA OT issue but possibly an Eclipse Help issue. Some issue with the search functionality?

When I generate output using the Eclipse Help deliverable from the same version of XMetaL Author Enterprise I get the following in the output HTML that is included with all the other files.

Code:
<html xml:lang="en-us" lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="copyright" content="(C) Copyright 2016"/>
<meta name="DC.rights.owner" content="(C) Copyright 2016"/>
<meta name="DC.Type" content="topic"/>
<meta name="DC.Title" content="Dog Leashes"/>
<meta name="abstract" content="Dog leashes allow you to maintain control over your dog's movements."/>
<meta name="description" content="Dog leashes allow you to maintain control over your dog's movements."/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="topic_FFBD2B97BF0A45099FCB2DCC08FE4A99"/>
<link rel="stylesheet" type="text/css" href="commonltr.css"/>
<title>Dog Leashes</title>
</head>
<body id="topic_FFBD2B97BF0A45099FCB2DCC08FE4A99">
<main role="main"><article role="article" aria-labelledby="ariaid-title1">
  <h1 class="title topictitle1" id="ariaid-title1">Dog Leashes</h1>
   
  <div class="body"><p class="shortdesc">Dog leashes allow you to maintain control over your dog's
movements.
  </p>
  </div>
 
</article></main></body>
</html>

I'm not sure the specifics of how the Eclipse Help search feature works but it does not appear to need meta-data to be present to support searching, or at least I don't see anything in any of the other files the DITA OT is producing that would appear to be related to search and it is working but partially broken.

What happens if you modify the content to include additional text and then search for that instead of text appearing in the title?
What happens if you replace the occurrence of "Dog leashes" in the description with some other text and then search for "dog leashes"?
What happens if you search for "Dog leashes", vs "Dog Leashes", vs "dog leashes"? (case sensitivity?)

Perhaps that will provide some clues you can use to follow up.

 73 
 on: September 19, 2016, 09:54:37 AM 
Started by adamm - Last post by adamm
Assume I have a concept with this title and short description:

<title>Dog Leashes</title>
  <shortdesc>Dog leashes allow you to maintain control over your dog's movements.
  </shortdesc>

When I generate eclipse help and do a search for dog leashes, the topic appears in the search results with the short description. However, the title words "Dog leashes" do not appear in the description:

Dog Leashes (link)
allow you to maintain control over your dog's movements.

This happens with any topic type in which the topic title begins the sentence in the short description.

Is this a known DITA OT problem? I'm not sure if this is an issue with XMetal or the DITA OT.

XMetal:

Binary#: 11.0.0.084
Installer#: 11.0.0196

DITA Default Version 1.2

Thanks,

Adam


 74 
 on: September 16, 2016, 04:11:53 PM 
Started by Markus - Last post by Derek Read
Yes, XMAX supports what you state here.

However, because XMAX does not use catalog files and has no fall-back folder (like the Rules folder in XMetaL Author) you must specify a SYSTEM id in the DOCTYPE declaration in your XML file that must resolve (ie: the DTD is located there). You can specify a PUBLIC id but it will not be used if the path specified in the SYSTEM id portion cannot be located.

Then when you call either LoadFromString() or LoadFromFile() do not specify a path to an XAC file (second parameter).
Depending on which language you are coding in you may need to specify a null value or empty string value for the syntax to be legal.

Here's an HTML / JScript example for use in a web page:

Code:
<html>
<head>
<title>XMAX Test</title>
</head>
<body>
<div>
<button onclick="newFile()">New File (from string)</button>
<button onclick="closeFile()">Close File</button>
<button onclick="showSpellChecker()" accesskey="S"><u>S</u>pell Check</button>
<button onclick="showAbout()">About...</button>
</div>
<div>
<object classid="CLSID:55EC30BE-EA43-45C4-ABD7-DDA7F6943D46" id="xmax" height="90%" width="100%">
<param Name="EnablePlainTextView" Value="true"/>
</object>
</div>

<script>
var xmlStr = '<?xml version="1.0"?><!DOCTYPE doc SYSTEM "C:\\xmax_html\\test.dtd"><doc><title>testing</title><p>testing</p></doc>';
var xmlDoc = xmax.LoadFromString(xmlStr, "", 1);
}

function closeFile() {
xmax.document.close();
}

function showSpellChecker() {
xmax.showSpellChecker();
}

function showAbout() {
xmax.showAbout();
}
</script>
</body>
</html>

 75 
 on: September 16, 2016, 05:37:00 AM 
Started by Markus - Last post by Markus
Hi,

we are creating a Windows application with XMAX 11. Is it required that the customizations are provided as an XAC file? Or can we also use the classic approach that is supported in XMetaL Author:
- myfile.xml is referencing mydtd.dtd
- mydtd.dtd, mydtd.css, mydtd.ctm ... reside in the same folder as myfile.xml

In my tryouts this did not work with XMAX.

Thanks,
Markus



 76 
 on: September 15, 2016, 06:52:05 AM 
Started by maciej_m - Last post by maciej_m
Hello,

I am looking for information how to set table titles below a tables
There are files responsible for generating table titles tables.xsl and tables-attr.xsl,but I managed to achieve only switching them on or off.

Could you give me a hand what should I change to place table titles below tables?

Regards

 77 
 on: September 14, 2016, 04:30:42 PM 
Started by ChrisTMH - Last post by Derek Read
Interesting that you mention that website. It is a very useful and well-organized resource that I've used over the years for various things. They link to fonts that contain a particular character (glyph for that character) on the page for each character. Look for "Fonts that support U+####". Or if you know the hex value you can create your own URL, example: http://www.fileformat.info/info/unicode/char/2605/fontsupport.htm

 78 
 on: September 14, 2016, 03:07:51 AM 
Started by ChrisTMH - Last post by ChrisTMH
Here's most of what it took to figure this out (minus a lot of testing of dead-ends that I have not listed).
Hopefully this process will help you with resolving this particular issue, but also help pick apart the DITA OT and figuring out what it does.

My #1 tool for working with the DITA OT is a good text search tool (or a good text editor that has a good text search feature).
#2 is some level of understanding of XSL, XSL-FO and the specifics of RenderX XEP (or Apache FOP or Antenna House Formatter if you are using that instead).

1. Search the subfolders in the DITA OT for the word "bullet" and hope that it exists in a comment or something in one of the file that would be related to PDF output. Turns out that the internationalization portions of the PDF output (for DITA OT 2.2) define a different character for different languages. For English the character specified is &#38;#38;#38;#38;#38;#x2022; There are two files included for English: en.xml and en_US.xml. The default for the DITA OT (if no xml:lang value is specified) is en_US.xml. How did I figure that out? More testing...Change line 125 in each file, one at a time, C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\cfg\common\vars\en_US.xml and en.xml and then generate a PDF to test each one. I used the letter "H" (could be any letter) because I thought there would be a good chance that the rest of the DITA OT would be specifying "normal" fonts that define glyphs for the alphabet and hopefully not a "wingdings"-like font.

2. After testing to see that "H" works change the value to some other character that doesn't render in the default PDF output but that does exist in a font I have. I chose a high code-point character (way outside the ASCII / Latin1 ranges) that will be obvious to spot if it shows up, the Unicode character "CIRCLED WHITE STAR" &#38;#38;#38;#38;#38;#x272a; A glyph for it is defined in the fonts Code2000 and Arial Unicode MS (both of which I have on my machine). So, at this point I've just made the change and confirmed that it does not appear when I generate PDF output. I think I am where you are at this point: I've found where I can change the character but it isn't rendering in the PDF. Revert it back to "H" so that we can do some further testing (because, as with anything software related, it's best to only ever change one thing if possible).

3. The variable named "Unordered List bullet" defined on line 125 in en_US.xml also appears in this file (which I also found via searching the xmfo subfolders): C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\xsl\fo\lists.xsl You don't need to do anything in there. However, I searched the rest of the files for that variable to check that it wasn't used elsewhere as well. What is useful to see in lists.xsl however, are the "attribute sets". I found three: "ul.li", "ul.li__label", and "ul.li__label__content". The DITA OT uses "use-attribute-sets" to call call an "attribute-set" that defines styling (for PDF output) and that could include specific fonts.

4. Search all files again for the following to see if any specific fonts are set: "ul.li", "ul.li__label", and "ul.li__label__content". The file that might set that up (where they do appear) is C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\Customization\fo\attrs\xm-cfg\lists-attr.xsl. There aren't any fonts set up in there, which tells me that those are all inheriting their font family from some parent block. So I think we have two options: a) try to figure out how far up that goes and then set a different font there. b) Try to figure out which of those three things is containing the bullet character and just set a different font only for that. I choose the latter as I think that will be easier (and less likely to cause problems elsewhere, given that if we change something higher up that is likely to cascade down into some other area and mess something up there).

5. So, in lists-attr.xsl is where we might set up a font. To be clean though, it would be best to put that in this file, effectively as an override:
C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\Customization\fo\attrs\custom.xsl
From the lists-attr.xsl file I copy this (again, I only know that this is where I need to set a font through additional trial and error on the other ones in there).
    <xsl:attribute-set name="ul.li__label__content">
        <xsl:attribute name="text-align">left</xsl:attribute>
    </xsl:attribute-set>
   
Paste that whole thing into custom.xsl after the <import> (because that's what imports all the other files and we want to override anything in the imported files, not have the imported files override what we set here). Then, for testing only, change the colour of the text to red (which hopefully will be the bullet if we guessed correctly). I include font-family here as well because eventually we'll do that too if this works.

     <xsl:attribute-set name="ul.li__label__content">
        <xsl:attribute name="text-align">left</xsl:attribute>

      <xsl:attribute name="font-family">Sans</xsl:attribute>
        <xsl:attribute name="color">red</xsl:attribute>
    </xsl:attribute-set>
   
Note: At this point, since we're not really messing with fonts and font embedding yet, you need to have left the character as an "H" in the en_US.xml file.
Generate output and check to see that your unordered lists have a red "H" next to them for the bullet.
If you don't see a red "H" then go back and check for typos, file paths, etc, and test again.

6. Now that that's working change the "H" to a character that is in a font that you have. In my case I will use Code2000 and &#38;#38;#38;#38;#38;#x272a; which means editing line 125 in the en_US.xml file.

7. Use the Windows charmap.exe tool to confirm that the font you want to use contains the character. In my case that means opening charmap.exe, selecting Code2000 as the font, then entering 272a as the hex value. I see the character so it is in there. If after entering the hex value and pressing enter the UI scrolls to a different character then the font doesn't have your character (charmap.exe scrolls to the nearest character that it does have instead).

8. Now you need the actual font name. Using Windows Explorer, open your Fonts folder, which is usually C:\Windows\Fonts. Find your font. Check to see that the font name matches exactly what you saw in charmap.exe. Font's often come in groups that include separate files for italic, bold, etc. Make sure you are selecting the right one. Right click on it and look at Properties to obtain the filename. In my case, for Code2000, the font's name is actually "Code2000 Medium" and the filename is "CODE2000.TTF" (the full path is C:\Windows\Fonts\CODE2000.TTF, which might be needed if your Fonts folder is in a non-default location).

9. Edit this file: C:\ProgramData\SoftQuad\XMetaL\Shared\renderx\xep.xml
Locate the following line:
    <font-group xml:base="file:/C:/Windows/Fonts/" label="Windows TrueType" embed="true" subset="true">
   
Inside that section add a new child element "font-family" that tells RenderX XEP where to locate your font:

   <font-family name="Code2000" embed="true">
      <font>
         <font-data ttf="CODE2000.TTF"/>
      </font>
   </font-family>
   
10. Edit this file: C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\cfg\fo\font-mappings.xml
Locate the following line:
        <font-table>

Inside that section add a new child element "logical-font" and name it "Bullets" and tell the DITA OT every time you see that to use the "Code2000" font and use it for all characters (which in our case is only one character):

   <logical-font name="Bullets">
      <physical-font char-set="default">
         <font-face>Code2000</font-face>
      </physical-font>
   </logical-font>

11. Reopen custom.xsl and change the font-family from "Sans" to "Code2000":

     <xsl:attribute-set name="ul.li__label">
        <xsl:attribute name="text-align">left</xsl:attribute>

      <xsl:attribute name="font-family">Bullets</xsl:attribute> <!--same name as the "logical-font" in font-mappings.xml-->
        <xsl:attribute name="color">red</xsl:attribute>
    </xsl:attribute-set>
   
12. Generate output. If you don't see your character in red then go back and check for typos, file paths, etc, and test again. You can also check to see if the font is being embedded by right clicking on the PDF and selecting "Properties" then the "Fonts" tab. That won't help you much except to show you that the font is (probably) not being embedded (and if it isn't then the character won't be visible).
Once it works remove the "color" attribute so that it appears black (if you want).

13. I have further modified the style in custom.xsl to add additional space after the bullet, so that it doesn't butt up against any content, by adding the following to the custom.xsl (which duplicates then modifies the attributes from lists-attr.xsl):

   <!--Unordered list-->
   <xsl:attribute-set name="ul">
      <!--effectively, the difference between the following two will be the gap between the bullet and any content in a list item-->
      <xsl:attribute name="provisional-distance-between-starts">1.5em</xsl:attribute>
      <xsl:attribute name="provisional-label-separation">0.5em</xsl:attribute>
      
      <!--these are being left unmodified-->
      <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
      <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
   </xsl:attribute-set>

Fantastic, thank you for the guide. I've successfully implemented this now.

One final question: if I find a symbol I would like online, say from fileformat.info, is there an easy way to find out which Windows font pack that symbol is embedded within?

 79 
 on: September 08, 2016, 02:29:15 PM 
Started by Derek Read - Last post by Derek Read
This topic has been moved to DITA and XMetaL Discussion.

http://forums.xmetal.com/index.php?topic=3840.0

 80 
 on: September 07, 2016, 05:39:59 PM 
Started by ChrisTMH - Last post by Derek Read
Here's most of what it took to figure this out (minus a lot of testing of dead-ends that I have not listed).
Hopefully this process will help you with resolving this particular issue, but also help pick apart the DITA OT and figuring out what it does.

My #1 tool for working with the DITA OT is a good text search tool (or a good text editor that has a good text search feature).
#2 is some level of understanding of XSL, XSL-FO and the specifics of RenderX XEP (or Apache FOP or Antenna House Formatter if you are using that instead).

1. Search the subfolders in the DITA OT for the word "bullet" and hope that it exists in a comment or something in one of the file that would be related to PDF output. Turns out that the internationalization portions of the PDF output (for DITA OT 2.2) define a different character for different languages. For English the character specified is &#x2022; There are two files included for English: en.xml and en_US.xml. The default for the DITA OT (if no xml:lang value is specified) is en_US.xml. How did I figure that out? More testing...Change line 125 in each file, one at a time, C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\cfg\common\vars\en_US.xml and en.xml and then generate a PDF to test each one. I used the letter "H" (could be any letter) because I thought there would be a good chance that the rest of the DITA OT would be specifying "normal" fonts that define glyphs for the alphabet and hopefully not a "wingdings"-like font.

2. After testing to see that "H" works change the value to some other character that doesn't render in the default PDF output but that does exist in a font I have. I chose a high code-point character (way outside the ASCII / Latin1 ranges) that will be obvious to spot if it shows up, the Unicode character "CIRCLED WHITE STAR" &#x272a; A glyph for it is defined in the fonts Code2000 and Arial Unicode MS (both of which I have on my machine). So, at this point I've just made the change and confirmed that it does not appear when I generate PDF output. I think I am where you are at this point: I've found where I can change the character but it isn't rendering in the PDF. Revert it back to "H" so that we can do some further testing (because, as with anything software related, it's best to only ever change one thing if possible).

3. The variable named "Unordered List bullet" defined on line 125 in en_US.xml also appears in this file (which I also found via searching the xmfo subfolders): C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\xsl\fo\lists.xsl You don't need to do anything in there. However, I searched the rest of the files for that variable to check that it wasn't used elsewhere as well. What is useful to see in lists.xsl however, are the "attribute sets". I found three: "ul.li", "ul.li__label", and "ul.li__label__content". The DITA OT uses "use-attribute-sets" to call call an "attribute-set" that defines styling (for PDF output) and that could include specific fonts.

4. Search all files again for the following to see if any specific fonts are set: "ul.li", "ul.li__label", and "ul.li__label__content". The file that might set that up (where they do appear) is C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\Customization\fo\attrs\xm-cfg\lists-attr.xsl. There aren't any fonts set up in there, which tells me that those are all inheriting their font family from some parent block. So I think we have two options: a) try to figure out how far up that goes and then set a different font there. b) Try to figure out which of those three things is containing the bullet character and just set a different font only for that. I choose the latter as I think that will be easier (and less likely to cause problems elsewhere, given that if we change something higher up that is likely to cascade down into some other area and mess something up there).

5. So, in lists-attr.xsl is where we might set up a font. To be clean though, it would be best to put that in this file, effectively as an override:
C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\Customization\fo\attrs\custom.xsl
From the lists-attr.xsl file I copy this (again, I only know that this is where I need to set a font through additional trial and error on the other ones in there).
    <xsl:attribute-set name="ul.li__label__content">
        <xsl:attribute name="text-align">left</xsl:attribute>
    </xsl:attribute-set>
   
Paste that whole thing into custom.xsl after the <import> (because that's what imports all the other files and we want to override anything in the imported files, not have the imported files override what we set here). Then, for testing only, change the colour of the text to red (which hopefully will be the bullet if we guessed correctly). I include font-family here as well because eventually we'll do that too if this works.

     <xsl:attribute-set name="ul.li__label__content">
        <xsl:attribute name="text-align">left</xsl:attribute>

      <xsl:attribute name="font-family">Sans</xsl:attribute>
        <xsl:attribute name="color">red</xsl:attribute>
    </xsl:attribute-set>
   
Note: At this point, since we're not really messing with fonts and font embedding yet, you need to have left the character as an "H" in the en_US.xml file.
Generate output and check to see that your unordered lists have a red "H" next to them for the bullet.
If you don't see a red "H" then go back and check for typos, file paths, etc, and test again.

6. Now that that's working change the "H" to a character that is in a font that you have. In my case I will use Code2000 and &#x272a; which means editing line 125 in the en_US.xml file.

7. Use the Windows charmap.exe tool to confirm that the font you want to use contains the character. In my case that means opening charmap.exe, selecting Code2000 as the font, then entering 272a as the hex value. I see the character so it is in there. If after entering the hex value and pressing enter the UI scrolls to a different character then the font doesn't have your character (charmap.exe scrolls to the nearest character that it does have instead).

8. Now you need the actual font name. Using Windows Explorer, open your Fonts folder, which is usually C:\Windows\Fonts. Find your font. Check to see that the font name matches exactly what you saw in charmap.exe. Font's often come in groups that include separate files for italic, bold, etc. Make sure you are selecting the right one. Right click on it and look at Properties to obtain the filename. In my case, for Code2000, the font's name is actually "Code2000 Medium" and the filename is "CODE2000.TTF" (the full path is C:\Windows\Fonts\CODE2000.TTF, which might be needed if your Fonts folder is in a non-default location).

9. Edit this file: C:\ProgramData\SoftQuad\XMetaL\Shared\renderx\xep.xml
Locate the following line:
    <font-group xml:base="file:/C:/Windows/Fonts/" label="Windows TrueType" embed="true" subset="true">
   
Inside that section add a new child element "font-family" that tells RenderX XEP where to locate your font:

   <font-family name="Code2000" embed="true">
      <font>
         <font-data ttf="CODE2000.TTF"/>
      </font>
   </font-family>
   
10. Edit this file: C:\ProgramData\SoftQuad\XMetaL\Shared\DITA_OT2.2\plugins\com.xmetal.xmfo\cfg\fo\font-mappings.xml
Locate the following line:
        <font-table>

Inside that section add a new child element "logical-font" and name it "Bullets" and tell the DITA OT every time you see that to use the "Code2000" font and use it for all characters (which in our case is only one character):

   <logical-font name="Bullets">
      <physical-font char-set="default">
         <font-face>Code2000</font-face>
      </physical-font>
   </logical-font>

11. Reopen custom.xsl and change the font-family from "Sans" to "Code2000":

     <xsl:attribute-set name="ul.li__label">
        <xsl:attribute name="text-align">left</xsl:attribute>

      <xsl:attribute name="font-family">Bullets</xsl:attribute> <!--same name as the "logical-font" in font-mappings.xml-->
        <xsl:attribute name="color">red</xsl:attribute>
    </xsl:attribute-set>
   
12. Generate output. If you don't see your character in red then go back and check for typos, file paths, etc, and test again. You can also check to see if the font is being embedded by right clicking on the PDF and selecting "Properties" then the "Fonts" tab. That won't help you much except to show you that the font is (probably) not being embedded (and if it isn't then the character won't be visible).
Once it works remove the "color" attribute so that it appears black (if you want).

13. I have further modified the style in custom.xsl to add additional space after the bullet, so that it doesn't butt up against any content, by adding the following to the custom.xsl (which duplicates then modifies the attributes from lists-attr.xsl):

   <!--Unordered list-->
   <xsl:attribute-set name="ul">
      <!--effectively, the difference between the following two will be the gap between the bullet and any content in a list item-->
      <xsl:attribute name="provisional-distance-between-starts">1.5em</xsl:attribute>
      <xsl:attribute name="provisional-label-separation">0.5em</xsl:attribute>
      
      <!--these are being left unmodified-->
      <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute>
      <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
   </xsl:attribute-set>

Pages: « 1 2 3 4 5 6 7 8 9 10 »
email us