Format and Indent changes character case

Having trouble installing Oxygen? Got a bug to report? Post it all here.
fraserhore
Posts: 4
Joined: Wed Nov 21, 2007 4:34 pm
Location: Switzerland

Format and Indent changes character case

Post by fraserhore »

When i select format and indent...

This: <instanceElement/> becomes <instanceelement/>

Is there any way to prevent the automatic formatting from changing the character case?

Thanks,

Fraser
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu »

Dear Fraser,

Oxygen does not change capitalization of characters in tag element names when format and indent is performed.
Please give us more details to reproduce the problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
fraserhore
Posts: 4
Joined: Wed Nov 21, 2007 4:34 pm
Location: Switzerland

Post by fraserhore »

I am using Oxygen to develop xforms. In my xforms document I have the following model:

<xforms:model>
<xforms:instance id="example" xmlns="">
<parameters>
<parameterOne/>
</parameters>
</xforms:instance>
</xforms:model>

When I click on the automatic format and indent menu button, <parameterOne/> becomes <parameterone/>.

It seems to have something to do with the fact that everything is in <html></html> tags. If i just put the above model into a file by itself, format and indent doesn't change the character case. But if I wrap <html></html> around it, then the "O" becomes "o".

Perhaps it's a schema thing where the schema for html doesn't expect to see anything other than html tags.
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu »

Dear Fraser,

Thank you for reporting this problem.
Indeed in the current version Oxygen treats HTML documents different on serialization and makes all tags lowercase.
We will try to come up with a fix as soon as possible and make a new 9.1 build to incorporate it.
In the meantime you can select the entire file, right click, go to "Source->Indent selection" to indent tags without formatting.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
fraserhore
Posts: 4
Joined: Wed Nov 21, 2007 4:34 pm
Location: Switzerland

Post by fraserhore »

if I use <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml">

Then it doesn't lower case the "O". But, I get the validation error: "Element type xhtml:html must be declared"
fraserhore
Posts: 4
Joined: Wed Nov 21, 2007 4:34 pm
Location: Switzerland

Post by fraserhore »

I got rid of the validation error by using xhtml:htm.

Could someone please provide a few words on how this validation works. I'd also love to have validation for xforms.

Thanks
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu »

Dear Fraser,

If you do not refer any particular schema or DTD in your XHTML file the "Oxygen Installation Dir/xhtml/dtd/xhtml1-strict.dtd" DTD will be used to provide content completion and validation.
DTD's do not have support for element namespaces and that is why you received the validation error.

In the Oxygen "samples" directory in the "nvdl" directory you can find a sample XHTML file called "xhtml-xforms.xml" which validates and has content completion with both XHTML Relax NG schema and the XForms XML Schema.
This is done by validating it against a NVDL schema which combines both schemas for validation and content completion.

Basically the NVDL document is referred from the XHTML document with a processing instruction:

Code: Select all

<?oxygen NVDLSchema="xhtml-xforms.nvdl"?>
Then in the "xhtml-xforms.nvdl" the XHTML and XForms schemas are referred relative to the NVDL schema.

You can find out more about the NVDL schemas support in Oxygen here:
http://www.oxygenxml.com/doc/ug-oxygen/ ... hemas.html
http://www.oxygenxml.com/onvdl.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Post by Radu »

Hi,

Just wanted to let you know that a Oxygen 9.1 release is available which fixes the problem you encountered.
You can download it from here: http://www.oxygenxml.com/download.html.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply