XInclude and content completion
Oxygen general issues.
-
- Posts: 190
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
XInclude and content completion
Post by martindholmes »
Hi there,
We're contemplating a large TEI project which would involve editors working on thousands of small files, each of which would contain ref elements linking to the xml:id attribute of other tags. Most of these other tags will be in a separate document, like this:
In doc 1:
<list>
<item xml:id="aaa">Item aaa</item>
<item xml:id="bbb">Item bbb</item>
</list>
In doc 2:
<ref target="#aaa">Link to aaa</ref>
We'd like to help the editors by enabling content completion for these values, so that when I type this in doc 2:
<ref target="
I see a drop-down list of the values in doc 1. I was hoping to accomplish this by using XInclude to include doc 1 in the header of doc 2, but it doesn't seem to work. Even if doc 1 is included in doc 2, the content completion engine still only shows me values from doc 2; it doesn't seem to parse through the XIncluded doc 1 to add its values to the list.
Is there any way I can make this work? Is it possible to have the content from doc 1 parsed by the content-completion engine without actually pulling the content into doc 2?
All help appreciated,
Martin
We're contemplating a large TEI project which would involve editors working on thousands of small files, each of which would contain ref elements linking to the xml:id attribute of other tags. Most of these other tags will be in a separate document, like this:
In doc 1:
<list>
<item xml:id="aaa">Item aaa</item>
<item xml:id="bbb">Item bbb</item>
</list>
In doc 2:
<ref target="#aaa">Link to aaa</ref>
We'd like to help the editors by enabling content completion for these values, so that when I type this in doc 2:
<ref target="
I see a drop-down list of the values in doc 1. I was hoping to accomplish this by using XInclude to include doc 1 in the header of doc 2, but it doesn't seem to work. Even if doc 1 is included in doc 2, the content completion engine still only shows me values from doc 2; it doesn't seem to parse through the XIncluded doc 1 to add its values to the list.
Is there any way I can make this work? Is it possible to have the content from doc 1 parsed by the content-completion engine without actually pulling the content into doc 2?
All help appreciated,
Martin
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Hi Martin,
First of all, in order for this to work you have to go to the Oxygen Preferences->XML->XML Parser page and make sure the "Enable XInclude processing" checkbox is activated.
Also Xincluding only works in the TEI P5 version.
The DTD's available in the TEI P4 version cannot be used to validate correctly a document with XIncluded sections.
The ID values are collected from the document when validating so if you change an ID value you have to re-validate the document in order to collect again all ID values.
Here are 2 sample files on which you can test this feature:
list.xml
main.xml
In the main.xml after pressing "Validate Document" you can invoke content completion in the ref target attribute value by pressing Ctrl-Space and there you should see "aaa" and "bbb" as proposed values.
If this does not work maybe you could give us more information like some complete sample files and the version of Oxygen you are currently using.
Regards,
Radu
First of all, in order for this to work you have to go to the Oxygen Preferences->XML->XML Parser page and make sure the "Enable XInclude processing" checkbox is activated.
Also Xincluding only works in the TEI P5 version.
The DTD's available in the TEI P4 version cannot be used to validate correctly a document with XIncluded sections.
The ID values are collected from the document when validating so if you change an ID value you have to re-validate the document in order to collect again all ID values.
Here are 2 sample files on which you can test this feature:
list.xml
Code: Select all
<list type="bulleted" xmlns="http://www.tei-c.org/ns/1.0">
<item xml:id="aaa">
<p>1</p>
</item>
<item xml:id="bbb">
<p>2</p>
</item>
</list>
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_xinclude.rng" type="xml"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<text>
<body>
<divGen type="toc"/>
<div type="sect">
<xi:include href="list.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<p>
Reference to <ref target="" >Ref</ref>
</p>
</div>
</body>
</text>
</TEI>
If this does not work maybe you could give us more information like some complete sample files and the version of Oxygen you are currently using.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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