Page 1 of 1
creating a new schema file - a bug with autocompletion
Posted: Mon Aug 02, 2004 11:05 pm
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.
Posted: Mon Aug 02, 2004 11:51 pm
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
more info
Posted: Wed Aug 04, 2004 3:22 am
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
Posted: Wed Aug 04, 2004 3:34 am
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
Posted: Wed Aug 04, 2004 4:36 am
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