creating a new schema file - a bug with autocompletion

Having trouble installing Oxygen? Got a bug to report? Post it all here.
dominik

creating a new schema file - a bug with autocompletion

Post by dominik »

I encountered a problem when using the automatically generated schema file. After I choose to create a new schema file, the template declares xs:schema namespace. When I try to add a new element, the editor does not provide me with a list of options. Renaming xs:schema tags to schema fixes the problem.
It looks like either the autogenerated template or editor should be fixed. Thoughts?

- Dominik

P.S. I'm using an evaluation version of oXygen 4.2.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Dominik,

Oxygen should give you content completion proposals on a schema no matter what prefix is used or if the http://www.w3.org/2001/XMLSchema is the default namespace. Maybe it just needed some time to parse the schema for schemas.

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<prefix:schema xmlns:prefix='http://www.w3.org/2001/XMLSchema'>

</prefix:schema>
should work as well as

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>

</xs:schema>
or

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns='http://www.w3.org/2001/XMLSchema'>

</schema>
Best Regards,
George
dominik
Posts: 6
Joined: Wed Aug 04, 2004 3:16 am

more info

Post by dominik »

Hi George,

Unfortunately, Oxygenxml does not seem to work the way you explained it.

My simple schema file is:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:dk="http://www.foo.com/dk"
targetNamespace="http://www.foo.com/dk">

</xs:schema>
and the only elements available in auto-complete are:

Code: Select all

    
</xs:schema>
<![CDATA[]]>
<!-- -->
- Dominik
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Dominik,

Oxygen is right to present those proposals because your document is not well formed, the xs prefix is not bound. I guess you ment to have:
xmlns:xs='http://www.w3.org/2001/XMLSchema'

Code: Select all


<?xml version="1.0" encoding="UTF-8"?> 
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:dk="http://www.foo.com/dk"
targetNamespace="http://www.foo.com/dk">


</xs:schema>
Now the content completion should present you the schema elements.

Best Regards,
George
dominik
Posts: 6
Joined: Wed Aug 04, 2004 3:16 am

Post by dominik »

George,
Thanks for the response, I got my file messed up somehow. I created a new schema file using File->New->XML Schema and the autocompletion works. Thank you for your help.

- Dominik
Post Reply