OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Using MathML XSL Stylesheets with XHTML and HtmlHelp,again


All,
 
In my endeavors to fix this issue, I ran into an issue with IE where I was getting an error trying to load the DTD for XHTML from WWW.W3.COM. It appears that IE has an issue that keeps going out to W3C every page to get the DTD again. This started to hammer the W3C servers and the DoS filters kicked in and locked out the TCP/IP addresses that were using. This was a known issue that W3C has been trying to get MS to fix.
 
MS finally did with patch #973688 which stops this behavior. If you don't have your system patched it may be a good thing to do.
http://support.microsoft.com/kb/973688
 
As a result of this patch, my XHTML that the HTMLHELP generates actually loaded and rendered the MathML in a Docbook test case. However, I am still kicking the old dog (HTMLHELP) trying to teach it new tricks to get the MathML back working.
 
Regards,
Dean Nelson
 
 
 
 
In a message dated 12/01/09 23:25:08 Pacific Standard Time, magnus.gafvert@modelon.se writes:
Thanks Dean.

Although discouraging, I am kind of satisfied to see that is was not a mistake from my side then. I will probably revert to converting the math to png and use vanilla htmlhelp.

Thanks for your time

Best regards,
Magnus

DeanNelson@aol.com wrote:
be0.6c5642fe.3847287d@aol.com type="cite">
Magnus,
 
MathML for the HTMLHelp is really touchy. I had it working and then I fixed it! Not sure what I did to make it work last year, but I can look into it. I retraced my steps and came up with the same results that you did.
 
Regards,
Dean Nelson
 
In a message dated 12/1/2009 5:56:07 A.M. Pacific Standard Time, magnus.gafvert@modelon.se writes:
Hi docbook experts!

I am struggling to get MathML to work with htmlhelp. The only useful reference I found was this <http://markmail.org/thread/5kxwqwx3uihdytv2> thread on this list, where Dean seems to have got this to work. Unfortunately, repeating (at the best of my skills) his steps does not succeed for me.

As described, I made a customization layer xsl (see attachment modelon-htmlhelp.xsl). The transformation (xsltproc with docbook xsl 1.75.2) passes fine and a set of files (index.htm.xml, ch01.htm.xml, etc) are generated. The generated xml files have the head elements (before <html>):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0  
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
Compilation with MS help compiler generate the warnings described in Dean's post and a chm file is generated.

Now, opening  the .chm file shows the document outline but not page contents.  The following error is displayed:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


System error: -2146697204. Error processing resource 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'.


The same error is reported when opening index.htm.xml in IE 8. It displays fine in Firefox.

I am quite new to docbook and xslt, so I may have misinterpreted the instructions. Any help or hints to what is wrong would be very much appreciated.

I got xhtml output to work on IE (see attachment modelon-xhtml.xsl), using the header tags
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
    
I also tried this dtd with htmlhelp, but without success.

Again, I would be much grateful for any hints or help on this matter.

/Magnus



<?xml version='1.0'?>
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.autolabel.max.depth" select="3"/>

</xsl:stylesheet>


<?xml version='1.0'?>
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="xhtml-1_1/onechunk.xsl"/>
<xsl:include href="modelon-common.xsl" />

<xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN</xsl:param>

<xsl:param name="chunker.output.doctype-system">http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd</xsl:param>

<xsl:param name="html.stylesheet" select="'docbook.css'"/>

</xsl:stylesheet>


<?xml version='1.0'?>
<xsl:stylesheet 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!-- http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg11927.html -->

<xsl:import href="htmlhelp/htmlhelp.xsl"/>
<xsl:include href="modelon-common.xsl" />

<xsl:template name="user.preroot">
<xsl:processing-instruction  name="xml-stylesheet">
<xsl:text>type="text/xsl" href="mathml.xsl"</xsl:text>
</xsl:processing-instruction>
</xsl:template>

<xsl:param name="html.ext">.htm.xml</xsl:param>

<!--
<xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN</xsl:param>

<xsl:param name="chunker.output.doctype-system">http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd</xsl:param>
-->

<xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.0 
Transitional//EN</xsl:param>

<xsl:param 
name="chunker.output.doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:param>

<xsl:param  name="chunker.output.omit-xml-declaration">no</xsl:param>
<xsl:param  name="chunker.output.method">xml</xsl:param>
<xsl:param  name="chunker.output.indent">yes</xsl:param>
<xsl:param  name="chunker.output.standalone">no</xsl:par am>
<xsl:param  name="chunker.output.encoding">UTF-8</xsl:param>

<xsl:param  name="htmlhelp.hhp.tail"> mathml.xsl
ctop.xsl
pmathml.xsl
pmathmlcss.xsl
</xsl:param>

<xsl:param name="html.stylesheet" select="'docbook.css'"/>

</xsl:stylesheet>


# Copy this template to your docbook project directory and rename to Makefile.
# Set the DOC variable to the document name (the prefix of your docbook xml file, exclude the .xml suffix):
DOCDIR=/C/JModelica.org-SDK/src/docbook/UsersGuide
DOC=JModelicaUsersGuide
DOCFILE=$(DOCDIR)/$(DOC).xml
XSLHTMLSTYLE=$(DOCBOOK_HOME)/modelon-html-IE.xsl
XSLXHTMLSTYLE=$(DOCBOOK_HOME)/modelon-xhtml.xsl
XSLPDFSTYLE=$(DOCBOOK_HOME)/modelon-fo.xsl
XSLHTMLHELPSTYLE=$(DOCBOOK_HOME)/modelon-htmlhelp.xsl

#http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html
$(DOC).xhtml:  $(DOCFILE)
    xsltproc  --xinclude  --output  $@ \
    $(XSLXHTMLSTYLE)  $<
    mv index.html $(DOC).xhtml

xhtml:  $(DOC).xhtml

$(DOC).html:  $(DOCFILE)
    xsltproc --xinclude  --output  $@ \
    $(XSLHTMLSTYLE)  $<

html:  $(DOC).html

# http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html
$(DOC).fo:  $(DOCFILE)
    rm -f $(DOC).fo
    xsltproc --xinclude  --outpu t  $@ \
    --stringparam fop1.extensions 1 \
    $(XSLPDFSTYLE)  $<

$(DOC).pdf: $(DOC).fo
    cmd /c "fop -fo $< $@"
    fop -fo $< $@

pdf:  $(DOC).pdf

htmlhelp.hhp: $(DOCFILE)
    xsltproc --xinclude $(XSLHTMLHELPSTYLE) $<

htmlhelp: $(DOC).chm

$(DOC).chm: htmlhelp.hhp
    -"$(HTMLHELPWORKSHOP_HOME)/hhc" $<
    mv htmlhelp.chm $@

ifeq ($(OS),Windows_NT)
winhelp: $(DOC).chm
else
winhelp:
endif

ifeq ($(OS),Windows_NT)
#all: xhtml html pdf winhelp
all: htmlhelp
#all: winhelp xhtml pdf
else
all: xhtml html pdf
endif

clean:
    rm -f *.pdf *.xhtml *.html *.fo *.hhp *.hhc *.chm



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


--
Magnus GÄFVERT, PhD
Principal Engineer / Chief Operating Officer

Phone direct: +46 46 286 2204
Email: magnus.gafvert@modelon.se


Modelon logo Modelon AB
Ideon Science Park
SE-223 70 Lund, Sweden
Phone: +46 46 286 2200
Fax: +46 46 286 2201
Email: sales@modelon.se
Web: http://www.modelon.se

http://www.3ds.com/company/regional-spotlights/nordics/dymola-webinar/#vid1
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]