Allowed elements in a:documentation?

Hello, I have unsuccessfully searched the web: in my Relax NG Grammar (XML): what elements can I use in the <a:documentation> element? <attribute name="foo"/> <a:documentation>This is what I mean</a:documentation> Patrick

Hi Patrick, The a:documentation is described in the RELAX NG DTD Compatibility specification: http://www.oasis-open.org/committees/relax-ng/compatibility.html#IDAC1YR It does not allow any elements inside, only text. Note however that in a Relax NG grammar any element not in the Relax NG namespace is considered annotation. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Patrick Gundlach wrote:
Hello,
I have unsuccessfully searched the web: in my Relax NG Grammar (XML): what elements can I use in the <a:documentation> element?
<attribute name="foo"/> <a:documentation>This is what I mean</a:documentation>
Patrick
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello George,
The a:documentation is described in the RELAX NG DTD Compatibility specification: http://www.oasis-open.org/committees/relax-ng/compatibility.html#IDAC1YR
It does not allow any elements inside, only text. Note however that in a Relax NG grammar any element not in the Relax NG namespace is considered annotation.
I have to admit that I don't understand your answer fully. The link above tells me, that in <a:documentation> no element is allowed. Right? The second part of your answer is what I don't understand. I can, for example, use <br /> in <a:documentation>. That gives me a linebreak in Oxygen. I'd guess that this is non-official?!? I only need it for Oxygen use, so I could live with that. Any more elements Oxygen understands in <a:documentation>? Or is this a "wrong" question? Patrick

Hi Patrick, My second part of the answer refers to the fact that in a Relax NG grammar you can use any element not in the Relax NG namespace as documentation, but not inside a:documentation, instead or at the same level with a:documentation: <grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:my="http://www.example.com/doc"> <start> <element name="root"> <my:doc>Root element description... <my:x>It is</my:x> - <my:y>empty!</my:y></my:doc> <empty/> </element> </start> </grammar> my:doc in the above case is also annotation. To enable oXygen to present the annotations other than a:documentation next to content completion proposals you need to enable the "Use all Relax NG annotations as documentation" from Options->Preferences -- Editor / Content Completion / Annotations. You can use also elements inside a:documentation, that is not a Relax NG schema error but it will not be according with the DTD compatibility spec that defines the a:documentation element. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Patrick Gundlach wrote:
Hello George,
The a:documentation is described in the RELAX NG DTD Compatibility specification: http://www.oasis-open.org/committees/relax-ng/compatibility.html#IDAC1YR
It does not allow any elements inside, only text. Note however that in a Relax NG grammar any element not in the Relax NG namespace is considered annotation.
I have to admit that I don't understand your answer fully. The link above tells me, that in <a:documentation> no element is allowed. Right? The second part of your answer is what I don't understand.
I can, for example, use <br /> in <a:documentation>. That gives me a linebreak in Oxygen. I'd guess that this is non-official?!? I only need it for Oxygen use, so I could live with that. Any more elements Oxygen understands in <a:documentation>? Or is this a "wrong" question?
Patrick
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello George, OK, I understand your answer now, thanks. But I didn't get closer to what I want to achieve. Now that I understand the subject a bit more I should ask: is there a way to format the tooltip help for elements and attributes (values) in Oxygen? I use the Relax NG XML grammar and Oxygen 11. Patrick

OK, I understand your answer now, thanks. But I didn't get closer to what I want to achieve. Now that I understand the subject a bit more I should ask: is there a way to format the tooltip help for elements and attributes (values) in Oxygen? I use the Relax NG XML grammar and Oxygen 11.
In particular, it would be lovely if we could associate some CSS with the annotations in a RELAX NG grammar. (After all, the tooltip is just a box -- I realize it might be just a box of text, but it may be a box that has gone through a rendering engine for all I know.) I, of course, use the TEI elements designed for annotating XML constructs. E.g. <tei:desc>The <tei:att>algorithm</tei:att> attribute need not be specified on the <tei:gi>sort</tei:gi> element, but if it is not specified, the application picks the algorithm at random. Woe to you if it picks <tei:val>blort</tei:val>!</tei:desc> And would love to be able to render those in a pretty way. (And if oXygen can already do this, just tell me how, and smirk to yourselves as I congratulate you and a job already well done. :-)

Hi Syd, That would be nice, I agree. But it is not a quick addition as it hits a number of places where we need changes: - store the annotations as markup (right now we extract the text) - change the tooltip renderer to be basically the oXygen Author - allow somehow the users to drop in CSS stylesheets for handling different annotation languages I recorded this on our Jira issue tracking system. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Syd Bauman wrote:
OK, I understand your answer now, thanks. But I didn't get closer to what I want to achieve. Now that I understand the subject a bit more I should ask: is there a way to format the tooltip help for elements and attributes (values) in Oxygen? I use the Relax NG XML grammar and Oxygen 11.
In particular, it would be lovely if we could associate some CSS with the annotations in a RELAX NG grammar. (After all, the tooltip is just a box -- I realize it might be just a box of text, but it may be a box that has gone through a rendering engine for all I know.)
I, of course, use the TEI elements designed for annotating XML constructs. E.g. <tei:desc>The <tei:att>algorithm</tei:att> attribute need not be specified on the <tei:gi>sort</tei:gi> element, but if it is not specified, the application picks the algorithm at random. Woe to you if it picks <tei:val>blort</tei:val>!</tei:desc> And would love to be able to render those in a pretty way.
(And if oXygen can already do this, just tell me how, and smirk to yourselves as I congratulate you and a job already well done. :-) _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Dear Patrick, There is no formatting support for Relax NG annotations. For a:documentation we collect all the text inside this element. For other annotations we collect all the text from all the elements and place each text node on a different line - and maybe you can take advantage of this to provide some formatting. For XML Schema we add some formatting automatically for tags like p, ul, li, for example something like <xs:documentation>This shows a list <ul> <li>item1</li> <li>item2</li> </ul></xs:documentation> Is formatted as This shows a list * item1 * item2 Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Patrick Gundlach wrote:
Hello George,
OK, I understand your answer now, thanks. But I didn't get closer to what I want to achieve. Now that I understand the subject a bit more I should ask: is there a way to format the tooltip help for elements and attributes (values) in Oxygen? I use the Relax NG XML grammar and Oxygen 11.
Patrick
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (3)
-
George Cristian Bina
-
Patrick Gundlach
-
Syd Bauman