@target on <name>
Posted: Thu Sep 10, 2020 11:00 pm
Hi,
there is probably a very good reason for this, and I'm a bit of newbie to XML schema design but I've got the following problem:
I want to be able to use Oxygen's built in services to improve xml input by allowing people to find the reference docs to # while marking up inline.
Specifically, I want people to be able to write <name type=[person/place etc target=[xml:id in a related xml document in the same folder]>kelso</name>.
Declaring the <choice> for @type is fine, and even declaring att.pointing.attributes on the <name> element gives the option of @target, which Oxygen reads and correctly points to the document list. However, the resulting link is only to the host document. As an example, in a document called "test.xml":
<ref target="listplace.xml#kelso>kelso</ref> points correctly to the entry for Kelso (xml:id=kelso) in the listplace.xml document, stored in the same folder.
But:
<name target="listplace.xml#kelso>kelso</name> (which formats fine with content completion and is valid against the schema) points instead to "test.xml" and so cannot resolve the xml:id.
I know that this is unorthodox usage, but for the specific project I'm working on being able to deliver this functionality without having to use both a <name> element and separate non-specific <ref> element. It *almost* works, but for some reason the last step eludes me...
Any help gratefully received
Ralph
there is probably a very good reason for this, and I'm a bit of newbie to XML schema design but I've got the following problem:
I want to be able to use Oxygen's built in services to improve xml input by allowing people to find the reference docs to # while marking up inline.
Specifically, I want people to be able to write <name type=[person/place etc target=[xml:id in a related xml document in the same folder]>kelso</name>.
Declaring the <choice> for @type is fine, and even declaring att.pointing.attributes on the <name> element gives the option of @target, which Oxygen reads and correctly points to the document list. However, the resulting link is only to the host document. As an example, in a document called "test.xml":
<ref target="listplace.xml#kelso>kelso</ref> points correctly to the entry for Kelso (xml:id=kelso) in the listplace.xml document, stored in the same folder.
But:
<name target="listplace.xml#kelso>kelso</name> (which formats fine with content completion and is valid against the schema) points instead to "test.xml" and so cannot resolve the xml:id.
I know that this is unorthodox usage, but for the specific project I'm working on being able to deliver this functionality without having to use both a <name> element and separate non-specific <ref> element. It *almost* works, but for some reason the last step eludes me...
Any help gratefully received
Ralph