Import XSD for autocompletion when Writing XML
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 6
- Joined: Wed Feb 15, 2012 5:45 pm
Import XSD for autocompletion when Writing XML
Hi,
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
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.
Lewis
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="http://www.w3.org/2001/XMLSchema-instance"
xsi:SchemaLocation="http://docs.oasis-open.org/legaldocml/ns/akn/3.0/CSD01 ./akomantoso20.xsd">
<tag1FromXSD>
</tag1FromXSD>
<lotsMoreTags>
</lotsMoreTags>
...
</akomaNtoso>
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.
Lewis
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Import XSD for autocompletion when Writing XML
Hi,
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="http://docs.oasis-open.org/legaldocml/ns/akn/3.0/CSD01" (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.
Regards,
Adrian
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="http://docs.oasis-open.org/legaldocml/ns/akn/3.0/CSD01" (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.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 6
- Joined: Wed Feb 15, 2012 5:45 pm
Re: Import XSD for autocompletion when Writing XML
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.
Lewis
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.
Lewis
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service