Problem with auto-tags
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 44
- Joined: Tue May 25, 2004 2:27 pm
Problem with auto-tags
I'm wondering.. have I got some setting wrong or.... ?
If I'm working in an XML doc, and entering tags, oXygen seems to be inconsistant with filling in the end tag. Sometimes when I type in the complete opening tag ( <tag> ) oXygen will follow it with the closing tag ( </tag> ) and place the cursor in between the open and close tags. Other times I'll type the opening tag, and oXygen does nothing. I have to manually close the tag.
Or, I type in an opening tag, enter the text that goes between the tags, and then type </ Sometimes oXygen will auto-fill the remainder of the closing tag, and other times it won't.. gives me the grey box with a list of tags... .often with only the one closing tag to choose from.
Running on Linux (kernel 2.6.11), Java 1.4.2_08, oXygen 6.1 Build 2005071905 (also happened in oXygen 6.0)
If I'm working in an XML doc, and entering tags, oXygen seems to be inconsistant with filling in the end tag. Sometimes when I type in the complete opening tag ( <tag> ) oXygen will follow it with the closing tag ( </tag> ) and place the cursor in between the open and close tags. Other times I'll type the opening tag, and oXygen does nothing. I have to manually close the tag.
Or, I type in an opening tag, enter the text that goes between the tags, and then type </ Sometimes oXygen will auto-fill the remainder of the closing tag, and other times it won't.. gives me the grey box with a list of tags... .often with only the one closing tag to choose from.
Running on Linux (kernel 2.6.11), Java 1.4.2_08, oXygen 6.1 Build 2005071905 (also happened in oXygen 6.0)
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
The rules of adding the closing tag when you enter the > on the start tag are quite simple. If oXygen finds a matching end tag for your start tag then it will not enter the closing tag. If you see the start tag underlined then that means a matching end tag was found.
I do not undesrtand exactly the second problem, maybe if you can send us a screenshot at support at oxygenxml dot com that will help. Basically the / character triggers the content completion. It you already have a prefix that matches a selection on the content completion then it inserts that element as an empty element, that is <element/>. If there is no prefix, that is it is inserted after < and the end tag is in the content completion proposals then it will insert the end tag.
Best Regards,
George
The rules of adding the closing tag when you enter the > on the start tag are quite simple. If oXygen finds a matching end tag for your start tag then it will not enter the closing tag. If you see the start tag underlined then that means a matching end tag was found.
I do not undesrtand exactly the second problem, maybe if you can send us a screenshot at support at oxygenxml dot com that will help. Basically the / character triggers the content completion. It you already have a prefix that matches a selection on the content completion then it inserts that element as an empty element, that is <element/>. If there is no prefix, that is it is inserted after < and the end tag is in the content completion proposals then it will insert the end tag.
Best Regards,
George
-
- Posts: 44
- Joined: Tue May 25, 2004 2:27 pm
Those are the rules I expect it to work on... thing is... it doesn't always work that way (at least not for me).
It's hard to describe... maybe if I go into more detail with the first problem... I start typing in my defined tags... for example (in a spot where vli is allowed):
When I type the > I would expect oXygen to add on the </vli> tag automatically and place the cursor inbetween the tags.
Sometimes it does this. Other times... nothing. in fact I can type several tags in a row... for example:
And sometimes oXygen will wake up and add in the closing tag for one of the three tags... sometimes 2 of them... sometimes all three (the expected behavior).
So, sometimes I get only:
other times:
and other times:
and so on....
This is all in a single document, and happens regardless of opening a new document, or using an existing document.
I just now opened a new document. I typed in 4 xml tags in a row... vl, vli, vt, and b. vl is always the parent tag. vli must have vl as it's parent, vt must have vli as it's parent, and b is allowed in the vt tag. I did this 10 times in a row, only typing in the 4 start tags. This is what I see in oXygen:
The 8th and 10th lines are the only ones that actually ended up being filled in correctly even though the exact same thing was typed each of the 10 times.
You say the rules are simple... that if oXygen finds a matching end tag for the start tag then it will NOT enter the closing tag? Ummm is that a typo? Shouldn't it be that if oXygen finds a matching end tag then it WILL enter the closing tag.
It's hard to describe... maybe if I go into more detail with the first problem... I start typing in my defined tags... for example (in a spot where vli is allowed):
Code: Select all
<vli>
Sometimes it does this. Other times... nothing. in fact I can type several tags in a row... for example:
Code: Select all
<vli><vt><b>
So, sometimes I get only:
Code: Select all
<vli><vt><b>
Code: Select all
<vli><vt><b></b>
Code: Select all
<vli><vt><b></vt>
This is all in a single document, and happens regardless of opening a new document, or using an existing document.
I just now opened a new document. I typed in 4 xml tags in a row... vl, vli, vt, and b. vl is always the parent tag. vli must have vl as it's parent, vt must have vli as it's parent, and b is allowed in the vt tag. I did this 10 times in a row, only typing in the 4 start tags. This is what I see in oXygen:
Code: Select all
<vl><vli><vt><b></b></vl>
<vl><vli><vt><b></b></vt></vl>
<vl><vli><vt><b></b></vt></vl>
<vl><vli><vt><b></vt></vl>
<vl><vli><vt><b></b></vt></vli>
<vl><vli><vt><b>
<vl><vli><vt><b></b></vt></vl>
<vl><vli><vt><b></b></vt></vli></vl>
<vl><vli><vt><b></b></vt></vli>
<vl><vli><vt><b></b></vt></vli></vl>
You say the rules are simple... that if oXygen finds a matching end tag for the start tag then it will NOT enter the closing tag? Ummm is that a typo? Shouldn't it be that if oXygen finds a matching end tag then it WILL enter the closing tag.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
Sorry, I cannot reproduce the problem.
Adding vl, vli, vt, b several times on a File->New--XML document I get:
No, it is not a typo. For instance if you have something like
then entering > in the | marked position will not add </element> as the new start tag is matched with the existing </element> end tag, giving
In general if you see <element| with an underscore highlighter then it is matched and the end tag will not be added automatically.
Best Regards,
George
Sorry, I cannot reproduce the problem.
Adding vl, vli, vt, b several times on a File->New--XML document I get:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<vl><vli><vt><b></b></vt></vli></vl>
<vl><vli><vt><b></b></vt></vli></vl>
<vl><vli><vt><b></b></vt></vli></vl>
<vl><vli><vt><b></b></vt></vli></vl>
<vl><vli><vt><b></b></vt></vli></vl>
<vl><vli><vt><b></b></vt></vli></vl>
Code: Select all
<element>
<element|
</element>
Code: Select all
<element>
<element>
</element>
Best Regards,
George
-
- Posts: 44
- Joined: Tue May 25, 2004 2:27 pm
That makes sense... I didn't read close enough the first time.then entering > in the | marked position will not add </element> as the new start tag is matched with the existing </element> end tag,


Hmmmm I wonder what is making it act like this for me.... I get these results (the 10 line example I gave in the previous post) for any combinations of any tag I type in.Sorry, I cannot reproduce the problem.
Adding vl, vli, vt, b several times on a File->New--XML document
Java:
Code: Select all
java -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
Code: Select all
uname -r
2.6.11.4-21.7-default
What other info can I provide to help here?
It's not a show stopper problem... just annoying that it is inconsistant. It's a very convenient feature when it works.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Best regards,
Sorin
Please post all the content of the document and the exact location where typing > reproduces the tag autocompletion problem. The location is displayed in the status bar as line:column. If the document declares a schema or DTD also post the content of that.smaug42 wrote:What other info can I provide to help here?
Best regards,
Sorin
-
- Posts: 44
- Joined: Tue May 25, 2004 2:27 pm
The problem is reproduceable on any line:column position within the page. It is also easily reproduceable in a new document or when I edit an existing document... again, on any line:column in the document (between the page tags of course)
Here is a sample document (some text has been replaced with "Company" in the examples). Note... this tag completion problem happens with any tag combination. I just use the vl tags because they are small and it's easy to show examples with this tag. I also cannot easily test on other platforms... I only have/use Linux.
I have a catalog file that points to where all my DTDs are located.
The DTDs are not so easy to post... there are a lot. I don't have all my DTD stuff all neatly packaged into one file.
This is page.dtd
The file common.ent contains all my "boilerplate" replaceable text like copyright statements, etc. The file build.ent contains all the build specifi info.. build date, status, version, etc.
The markup.mod is where most of the interesting stuff is... and I've selected a few bits from it (related to the vl tags) - it's rather large to be posting here...
Here is a sample document (some text has been replaced with "Company" in the examples). Note... this tag completion problem happens with any tag combination. I just use the vl tags because they are small and it's easy to show examples with this tag. I also cannot easily test on other platforms... I only have/use Linux.
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE page PUBLIC "-//Company//DTD Page 1.1//EN" "page.dtd">
<page author="$Author: clayton $" base="" date="$Date: 2005/07/25 10:55:12 $"
rcsfile="$RCSfile: test.xml,v $" revision="$Revision: 1.1 $"
source="$Source: /home/cvsroot/company/doc/xml/test.xml,v $">
<title>Test document</title>
<p>Test document for auto tag problem</p>
<!-- These tags are typed in order... first vl, then vli,
then vt, then b -->
<vl><vli><vt><b></b></vt>
<vl><vli><vt><b></b></vt></vli>
<vl><vli><vt><b></b>
<!-- and so on -->
<!-- this document will not validate in this form because
I did not complete each set of the vl tags -->
</page>
The DTDs are not so easy to post... there are a lot. I don't have all my DTD stuff all neatly packaged into one file.
This is page.dtd
Code: Select all
<!ENTITY % build.ent PUBLIC "-//Company//Build Entities 1.0//EN" "build.ent">
%build.ent;
<!ENTITY % common.ent PUBLIC "-//Company//Common Entities 1.0//EN" "common.ent">
%common.ent;
<!ENTITY % toplevel.custom "|section|related">
<!ENTITY % markup.mod PUBLIC "-//Company//DTD Markup 1.1//EN" "markup.mod">
%markup.mod;
<!ELEMENT page (title,locations?,(%toplevel.mix;)*)>
<!ATTLIST page %level.attr;
%cvs.attr;
%review.attr;
base CDATA #IMPLIED>
<!ELEMENT section (title, (%toplevel.mix;)*)>
<!ATTLIST section %level.attr;>
<!ELEMENT related (%see.mix;)*>
The markup.mod is where most of the interesting stuff is... and I've selected a few bits from it (related to the vl tags) - it's rather large to be posting here...
Code: Select all
<!-- List tags -->
<!ENTITY % list.mix "ol|ul|vl">
<!ENTITY % listitem.doc "vli|vt|vd|vx|li">
<!-- Description list tag -->
<!ELEMENT vl (vli)*>
<!ATTLIST vl %all.attr;
%class.attr;>
<!ELEMENT vli (vt*,vx*,vd)>
<!ATTLIST vli %all.attr;>
<!-- List item tags -->
<!ELEMENT vt (#PCDATA|%inline.mix;)*>
<!ATTLIST vt %all.attr;>
<!ELEMENT vd (%listitem.mix;)*>
<!ATTLIST vd %all.attr;>
<!ELEMENT vx (#PCDATA|%inline.mix;)*>
<!ATTLIST vx %all.attr;>
<!-- All the tags that can be used as inline -->
<!ENTITY % inline.mix "b|i|replaceable|userinput|computeroutput|instructions|link|%see.mix;|img|br|tag%inline.custom;">
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