Import XSD for autocompletion when Writing XML

Questions about XML that are not covered by the other forums should go here.
Posts: 6

Import XSD for autocompletion when Writing XML

Thu Jan 24, 2013 5:05 am

Addmitedly, I've been away from oXygen for a while and have forgotten a basic of XML authoring.
I'm looking to import my schema as follows

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<akomaNtoso xmlns:xsi=""
    xsi:SchemaLocation=" ./akomantoso20.xsd">

Please note that the online schemaLoction does NOT exist yet, however I have it available locally e.g. in the same directory as the XML I am authoring.
I would therefore like to have elements autocomplete whenever I try to open a new tag e.g. <tag1FromXSD>. This should be picked up from the XSD within the same directory.

How do I do this?
Sorry for real basic question.
Thank you very much for the help if it is available.
Posts: 2378

Re: Import XSD for autocompletion when Writing XML

Thu Jan 24, 2013 11:25 am


The most significant issue with this is that XML is case sensitive, so xsi:SchemaLocation won't work. It has to be xsi:schemaLocation (note the lowercase 's'). You'll also need to declare the default namespace: xmlns="" (assuming that this is the target namespace of the schema).

However, it's a lot easier to just use Oxygen's Associate Schema action (Document > Schema > Associate Schema or the corresponding toolbar button), pick your XML schema file, and it will do all this for you.

Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
Posts: 6

Re: Import XSD for autocompletion when Writing XML

Fri Jan 25, 2013 12:09 am

Hi Adrian,
This is exactly what I was looking for.
oXygen 14.1 is well and truly a bt above the rest.
I am gutted I won't be at XMLPrague again this year :0(
Thank you very much for your help, have a great day.

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests