<xs:key> and <xs:keyref> support?
This should cover W3C XML Schema, Relax NG and DTD related problems.
<xs:key> and <xs:keyref> support?
Hey,
I'm using <xs:key> and <xs:keyref> in my schema to link elements together. In my XML file, everything validates ok (ie: I get an error if keys aren't unique or if I reference a nonexistant key), but I thought oXygen was supposed to give me a list with possible values for a key reference, like it does with enumerations. Is this not supported? Did I miss a checkbox somewhere? I tried using the xs:ID and xs:IDREF datatypes before and had the same problem. Validates/errors properly, but no list in the editor.
As an aside, oXygen did provide the list when I was writing the schema. When I wrote the <xs:keyref> tag, it gave me a list of the <xs:key> tags I created.
-Kyle
I'm using <xs:key> and <xs:keyref> in my schema to link elements together. In my XML file, everything validates ok (ie: I get an error if keys aren't unique or if I reference a nonexistant key), but I thought oXygen was supposed to give me a list with possible values for a key reference, like it does with enumerations. Is this not supported? Did I miss a checkbox somewhere? I tried using the xs:ID and xs:IDREF datatypes before and had the same problem. Validates/errors properly, but no list in the editor.
As an aside, oXygen did provide the list when I was writing the schema. When I wrote the <xs:keyref> tag, it gave me a list of the <xs:key> tags I created.
-Kyle
Hi Kyle,
Oxygen has support for offering the ID values for IDREF fields and also a list of ID values for IDREFS fields. The ID values are collected when the document is validated so you need to run at least one validate action to have the ID values collected. See also http://www.oxygenxml.com/demo/ids/ids.html
The cotent completion for the XML Schema was enhanced with support for offering dynamic values, computed from the edited document, as you noted on the referred key it presents the already defined keys and there are also many other cases where we do similar things - I think we covered all the possible references inside the document and we also added the built-in schema types where appopriate.
Best Regards,
George
Oxygen has support for offering the ID values for IDREF fields and also a list of ID values for IDREFS fields. The ID values are collected when the document is validated so you need to run at least one validate action to have the ID values collected. See also http://www.oxygenxml.com/demo/ids/ids.html
The cotent completion for the XML Schema was enhanced with support for offering dynamic values, computed from the edited document, as you noted on the referred key it presents the already defined keys and there are also many other cases where we do similar things - I think we covered all the possible references inside the document and we also added the built-in schema types where appopriate.
Best Regards,
George
So you are indeed saying that there's no tag insight support for <xs:key> and <xs:keyref>?
As for ID and IDREF, I couldn't get them to work either. Is the problem that I have IDs spread across multiple locations?
As for ID and IDREF, I couldn't get them to work either. Is the problem that I have IDs spread across multiple locations?
Code: Select all
<mydocument>
<someReferenceElements>
<referenceElement ref="1" />
<referenceElement ref="4" />
</someReferenceElements>
<someKeyElements>
<aKeyElement id="1" />
<aKeyElement id="2" />
<aKeyElement id="3" />
</someKeyElements>
<differentKeyElements>
<differentKeyElement id="4" />
<differentKeyElement id="5" />
<differentKeyElement id="6" />
</differentKeyElements>
</mydocument>
Hi Kyle,
I do not see a schema in your sample code. As I said the ID/IDREF support works after the document is validated, that implies a schema. Otherwise oXygen cannot tell that some value is of type ID, IDREF or IDREFS. The demo I pointed you to (http://www.oxygenxml.com/demo/ids/ids.html) shows how this work on the samples files that come with oXygen and you may give a try to one of those files. The ID/IDREF support is implemented to work with XML Schemas, DTDs and Relax NG Schemas.
Best Regards,
George
I do not see a schema in your sample code. As I said the ID/IDREF support works after the document is validated, that implies a schema. Otherwise oXygen cannot tell that some value is of type ID, IDREF or IDREFS. The demo I pointed you to (http://www.oxygenxml.com/demo/ids/ids.html) shows how this work on the samples files that come with oXygen and you may give a try to one of those files. The ID/IDREF support is implemented to work with XML Schemas, DTDs and Relax NG Schemas.
Best Regards,
George
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