oXygen vocabulary for XSLT documentation

Hi, I use the http://www.oxygenxml.com/ns/doc/xsl elements to document a stylesheet. I am looking for an equivalent of the HTML element CODE, to insert an inline piece of code. But the only inline elements I can find are for bold and italic. Did I miss something? Also, because I know I am going to generate HTML output, is it possible to use XHTML elements in an xd:p element? In order to escape to raw HTML when there is no support in the oXygen doc vocabulary for something I want to use in HTML (e.g. the CODE element, if it happens to be not supported). And finally, for the same reason, is it possible to customize the generation of the output? (I guess there is at least some XSLT involved in there... ;-p) Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/

Hi, Unfortunately such an element doesn't exist. I will post a request for us to add an element similar to the HTML 'code' element. But for now, you can use HTML elements and they will be recognized and copied as they are (they must be from namespace http://www.w3.org/1999/xhtml in order to be recognized). Also the stylesheets used to obtain the HTML output are available in {oXygenInstallDir}/frameworks/stylesheet_documentation/xsl. The schemas for the documentation format as well as for the intermediate XML generated from the stylesheets are also available in the stylesheet_documentation folder. To make Oxygen use other stylesheets for output you have to switch to the "Custom" format in the "XSL Stylesheet Documentation" dialog and specify the stylesheets to be used through the "Options" button. Regards, Alex Alex Jitianu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 9/7/2011 12:13 PM, Florent Georges wrote:
Hi,
I use the http://www.oxygenxml.com/ns/doc/xsl elements to document a stylesheet. I am looking for an equivalent of the HTML element CODE, to insert an inline piece of code. But the only inline elements I can find are for bold and italic. Did I miss something?
Also, because I know I am going to generate HTML output, is it possible to use XHTML elements in an xd:p element? In order to escape to raw HTML when there is no support in the oXygen doc vocabulary for something I want to use in HTML (e.g. the CODE element, if it happens to be not supported).
And finally, for the same reason, is it possible to customize the generation of the output? (I guess there is at least some XSLT involved in there... ;-p)
Regards,
-- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Alex Jitianu wrote: Thanks! That's helpful info.
But for now, you can use HTML elements and they will be recognized and copied as they are (they must be from namespace http://www.w3.org/1999/xhtml in order to be recognized).
That's what I thought too, so I tried but it didn't work. But... I must agree that by "didn't work" I mean it did not produce the expected visual result in the browser. But after your response I looked at the generated HTML source, and it turned out that the element was there, in the correct namespace, with the same prefix, but browsers interpret it as XHTML only when the element name has no prefix... So this works, yes, but only when one uses the XHTML namespace without prefix in the stylesheet itself. Which is too big a constraint for me. So I changed stylesheet_documentation/xsl/htmlDocToHtml.xsl by removing: <xsl:template match="h:*" mode="documentation"> <xsl:copy> ... and changing it to: <xsl:template match="h:*" mode="documentation"> <xsl:element name="{ local-name(.) }" namespace="http://www.w3.org/1999/xhtml"> ... which should solve the problem, but it does not seem to change anything in the output (even after I restarted oXygen). Maybe I simply picked the wrong stylesheet? Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/

Have you switched to the "Custom" format in the "XSL Stylesheet Documentation" dialog? I forgot to mention that the main XSL that should be specified in the "Options" dialog is "xslDocHtml.xsl" from the same folder {oXygenInstallDir}/frameworks/stylesheet_documentation/xsl. The stylesheets from the "frameworks" folder are a copy of the ones used for the HTML format so you have to switch to "Custom" in order for them to be used. It's also helpful to check "Copy additional resources to the output folder" - it will copy the images used by the HTML format. Also, considering the fact that the output is HTML I think that your approach to remove the prefix from the XHTML element is the way to go. We will update the stylesheets ourselves with this fix. Thanks for letting us know. Regards, Alex Alex Jitianu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 9/7/2011 6:00 PM, Florent Georges wrote:
So I changed stylesheet_documentation/xsl/htmlDocToHtml.xsl by removing:
<xsl:template match="h:*" mode="documentation"> <xsl:copy> ...
and changing it to:
<xsl:template match="h:*" mode="documentation"> <xsl:element name="{ local-name(.) }" namespace="http://www.w3.org/1999/xhtml"> ...
which should solve the problem, but it does not seem to change anything in the output (even after I restarted oXygen). Maybe I simply picked the wrong stylesheet?
Regards,
-- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/

Alex Jitianu wrote: Hi,
The stylesheets from the "frameworks" folder are a copy of the ones used for the HTML format so you have to switch to "Custom" in order for them to be used.
Good catch! Because I modified directly the framework dir, I thought the changes whould be taken into account directly. They were not, but they are now specifying it in "Custom".
Also, considering the fact that the output is HTML I think that your approach to remove the prefix from the XHTML element is the way to go. We will update the stylesheets ourselves with this fix.
Good, thank you. I confirm it works on my system at least. Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/
participants (2)
-
Alex Jitianu
-
Florent Georges