XML Schema annotation
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 57
- Joined: Tue Jul 21, 2009 1:48 am
XML Schema annotation
Hi - wondering if you have advise on the following... basically I'd like to be able to author specific elements/attributes within the <xs:annotation> elements in a schema. For example, I might want to require within the xs:annotation/xs:documentation element several elements like 'description', 'label' and other metadata. Same with the <xs:appInfo>. These elements/attributes would be in the pop-up suggestions along with the other xs:schema elements when authoring the XML (in text mode). The ultimate goal of this is transformation for more detailed online documentation (perhaps even an extension of your existing schema documentation XSLT).
I'm assume that setting up a custom Document Type Association is what's required here, but I'm a bit unsure about how to go about it - the XML Schema is a bit more complex than most I suspect. Any suggestions on how to leverage Oxygen's framework in this way would be greatly appreciated.
Thanks, Scott
I'm assume that setting up a custom Document Type Association is what's required here, but I'm a bit unsure about how to go about it - the XML Schema is a bit more complex than most I suspect. Any suggestions on how to leverage Oxygen's framework in this way would be greatly appreciated.
Thanks, Scott
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XML Schema annotation
Hi Scott,
There is a preferences page where you can point Oxygen to an XML Schema which should be used to propose content completion entries inside xs:appInfo elements when editing other XML Schemas:
https://www.oxygenxml.com/doc/versions/ ... n-xsd.html
We do not have a similar feature for xs:documentation.
Regards,
Radu
There is a preferences page where you can point Oxygen to an XML Schema which should be used to propose content completion entries inside xs:appInfo elements when editing other XML Schemas:
https://www.oxygenxml.com/doc/versions/ ... n-xsd.html
We do not have a similar feature for xs:documentation.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 57
- Joined: Tue Jul 21, 2009 1:48 am
Re: XML Schema annotation
Well... I must be doing something wrong. My schema looks like this:
And I have the preference set to "Other" pointing to this schema. I don't see the element "test" in the context popup. I've tried it as both global and project based preference, with and without a target namespace. What am I doing wrong? I'm using v24.1.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" >
<xs:element name="test" type="xs:string" />
</xs:schema>
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XML Schema annotation
Hi,
I tested and this seems to be working for me:
I tested and this seems to be working for me:
Screen Shot 2022-11-10 at 14.54.34.png
Screen Shot 2022-11-10 at 14.55.45.png
You do not have the required permissions to view the files attached to this post.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 1
- Joined: Thu Nov 17, 2022 6:35 am
- Contact:
Re: XML Schema annotation
Hello,
Thank you for your advice. I was also wondering if we could point oxygen to an XML schema. I got my answer from this link.
Thank you for your advice. I was also wondering if we could point oxygen to an XML schema. I got my answer from this link.
-
- Posts: 57
- Joined: Tue Jul 21, 2009 1:48 am
Re: XML Schema annotation
Just a few notes from my experience with this - while it does get the elements in the schema added to the contextual menu, there is no real validation per the annotation schema you point at. I suppose I thought that might be possible but thinking about it its not surprising it doesn't. Given the volume of documentation and the size of my schema, I'm starting to think in terms of just having another document I define and linking to it using the @source attribute on the xs:documentation and xs:appinfo. This provides a bit more flexibility in my case - for smaller schemas it's probably easier just to keep it all in the schema and to use this feature which all said is still quite useful.
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