473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XMetal and Default Element Content

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?
Jul 20 '05 #1
1 1639
Marlin wrote:

(late answer as I've been away for a while)
I am trying to add default content to an element so that
this content is inserted when the element is inserted.


this can be done with a template in the CTM file:

<Template>
<Name>elem</Name>
<MiniTemplate><![CDATA[<elem
attr="val"/>]]></MiniTemplate>
</Template>

HTH, andreas
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Falko Guderian | last post by:
Hello to all! I'm a german student and while working with XML, I've got the following problem. I've a simple xsl-stylesheet and xml-document. I've read, that it's easy to create a HTML from...
2
by: Nora | last post by:
Hi there! We have created a dtd. Now, when creating xml files based on this dtd we want to provide an own online help. (This online help explains: which tag can be used where, writing schemas,...
1
by: shavazo | last post by:
I saw some older messages about users asking about SGML capabilities and development/customization of XMetaL post 4.0 Well, the latest release is 4.6 and has some capabilities that may interest...
0
by: ddwyer | last post by:
I am working with a custom DTD and am having some issues with XMetal Developer 4.5 and displaying tables correctly. For some reason when I design the CSS file for displaying in Normal or Tags On...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.