M
Marlin
I am inquiring for a customer of mine who is using XMetal 3.0 as an
XML editor. I am trying to add default content to an element so that
this content is inserted when the element is inserted.
In more detail: When using XMetal to view an XML file in 'tags on'
view, you are able to view the attributes and the elements that are
allowed within each tag depending on where you are in the document.
From here you can select the tag you are wanting to add and it
automatically inserts the start and end tag into the document.
In regards to Cross References (XPointers), our DTD using the tag
<xref>, with the fixed attribute
"xmlns:xlink=http://www.w3.org/1999/xlink" When an xref tag is
inserted into an XML document, the markup <xref> </xref> is added.
At present, when you switch to plain text view only the <xref> </xref>
markup is inserted. Is possible to include the xlink text
(xmlns:xlink=http://www.w3.org/1999/xlink) to this element so that
when it is inserted, this xlink text is also inserted into the
document saving typing it each time? That is: in plain text view, the
document will display "<xref
xmlns:xlink="http://www.w3.org/1999/xlink" </xref>.
For your information , the DTD defines this element as follows:
<!ELEMENT xref (#PCDATA)>
<!ATTLIST xref
xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"
xlink:type (simple) #FIXED "simple"
xlink:href CDATA #REQUIRED >
Also, I attempted to do this via the Tools/Customizations/On
Insert/Content menu but it does not appear to add the specified text
to the element when inserted.
Can anyone help?
XML editor. I am trying to add default content to an element so that
this content is inserted when the element is inserted.
In more detail: When using XMetal to view an XML file in 'tags on'
view, you are able to view the attributes and the elements that are
allowed within each tag depending on where you are in the document.
From here you can select the tag you are wanting to add and it
automatically inserts the start and end tag into the document.
In regards to Cross References (XPointers), our DTD using the tag
<xref>, with the fixed attribute
"xmlns:xlink=http://www.w3.org/1999/xlink" When an xref tag is
inserted into an XML document, the markup <xref> </xref> is added.
At present, when you switch to plain text view only the <xref> </xref>
markup is inserted. Is possible to include the xlink text
(xmlns:xlink=http://www.w3.org/1999/xlink) to this element so that
when it is inserted, this xlink text is also inserted into the
document saving typing it each time? That is: in plain text view, the
document will display "<xref
xmlns:xlink="http://www.w3.org/1999/xlink" </xref>.
For your information , the DTD defines this element as follows:
<!ELEMENT xref (#PCDATA)>
<!ATTLIST xref
xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"
xlink:type (simple) #FIXED "simple"
xlink:href CDATA #REQUIRED >
Also, I attempted to do this via the Tools/Customizations/On
Insert/Content menu but it does not appear to add the specified text
to the element when inserted.
Can anyone help?