Unbalanced Tag Error in FOSI Usetext
‎Nov 30, 2011
03:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
03:19 PM
Unbalanced Tag Error in FOSI Usetext
I'm trying to add metadata and bookmarks when publishing a document to PDF using a FOSI stylesheet. I've added a usetext to the root tag however everytime I try to apply the FOSI changes I receive a "Generated text contains unbalanced tags, i.e. begin tags without ends, or vice versa. Cannot insert."
I would appreciate any help you could offer,
FOSI Code:
<e-i-c gi="comdtinst">
<charlist>
<usetext source="!<atidmd:DocumentMetaData source="atend"></atidmd:DocumentMetaData>!" placemnt="before"></usetext>
<usetext source="!<atidmd:DocumentMetaData"><atidmd:outline><atidmd:bookmark><atidmd:title>Book Title</atidmd:title></atidmd:bookmark></atidmd:outline></atidmd:documentmetadata>!" placemnt="after"></usetext>
</charlist>
</e-i-c>
24 REPLIES 24
‎Nov 30, 2011
03:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
03:27 PM
If I remember correctly, if your construction rule contains markup with attribute values in it, you have to have the exclamation at the beginning AND end of each tag in the tag pair.
‎Nov 30, 2011
03:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
03:34 PM
This isn't much help, but I have gotten that error message when unbalanced tags were not really the problem. That was some years back, so unfortunately I don't recall what the real problem was.
Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"
Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"
‎Nov 30, 2011
03:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
03:42 PM
Do you have a namespace declaration for atidmd in your fosi?
Try adding the following "attribute specification" to your outspec tag:
Try adding the following "attribute specification" to your outspec tag:
‎Nov 30, 2011
03:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
03:48 PM
Thanks for your response. Unfortunately that didn't work.
‎Nov 30, 2011
04:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:00 PM
Paul is right about the namespace, but I would have thought it would throw a different error.
Usually start and end tags still require commas to separate them. Try this:
source='!<atidmd:documentmetadata source="atend">!,!</atidmd:documentmetadata>!'
Usually start and end tags still require commas to separate them. Try this:
source='!<atidmd:documentmetadata source="atend">!,!</atidmd:documentmetadata>!'
‎Nov 30, 2011
04:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:00 PM
WOW!! Thanks for the heads up. I pulled this code right out of the Arbortext Help files so I can only ASSUME that it is correct.
‎Nov 30, 2011
04:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:13 PM
Ok. I added the name space to the outspec tag
<outspec fosicite="xmlns:atidmd="<a style="COLOR: blue; TEXT-DECORATION: underline" target="_BLANK" href="http://www.arbortext.com/namespace/DocumentMetaData">">http://www.arbortext.com/namespace/DocumentMetaData">
And
I added the !,! in between the tags. Still getting the same error.
<usetext source="!<atidmd:DocumentMetaData source="atend">!,!</atidmd:DocumentMetaData>!" placemnt="before"></usetext>
<outspec fosicite="xmlns:atidmd="<a style="COLOR: blue; TEXT-DECORATION: underline" target="_BLANK" href="http://www.arbortext.com/namespace/DocumentMetaData">">http://www.arbortext.com/namespace/DocumentMetaData">
And
I added the !,! in between the tags. Still getting the same error.
<usetext source="!<atidmd:DocumentMetaData source="atend">!,!</atidmd:DocumentMetaData>!" placemnt="before"></usetext>
‎Nov 30, 2011
04:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:19 PM
I think you need commas between your pseudo-tags.
‎Nov 30, 2011
04:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:21 PM
Hi Sarah--
Just to make sure, you should remove the after gentext when testing
this to avoid confounding.
In other words, try this:
<e-i-c gi="comdtinst">
<charlist>
<usetext source="!<atidmd:DocumentMetaData<br />source="atend">!,!</atidmd:DocumentMetaData>!" <br="/>placemnt="before"></usetext>
</charlist>
</e-i-c>
If that works, then you're on the right track; apply the same logic to
the after gentext, and Bob's your uncle.
--Clay
Clay Helberg
Senior Consultant
TerraXML
Just to make sure, you should remove the after gentext when testing
this to avoid confounding.
In other words, try this:
<e-i-c gi="comdtinst">
<charlist>
<usetext source="!<atidmd:DocumentMetaData<br />source="atend">!,!</atidmd:DocumentMetaData>!" <br="/>placemnt="before"></usetext>
</charlist>
</e-i-c>
If that works, then you're on the right track; apply the same logic to
the after gentext, and Bob's your uncle.
--Clay
Clay Helberg
Senior Consultant
TerraXML
‎Nov 30, 2011
04:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:23 PM
I don't think you need the exclamation marks, just the commas.
‎Nov 30, 2011
04:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:39 PM
in a hushed and quiet voice: you could try making the edit with a text
editor and then see if Arbortext notices on a re-open ....
also, where you have text, you could try:
blah>!,\yourtext\,!<...
and if it is in a var, it would look like:
blah>!,yourtextvar.txt,!<...
editor and then see if Arbortext notices on a re-open ....
also, where you have text, you could try:
blah>!,\yourtext\,!<...
and if it is in a var, it would look like:
blah>!,yourtextvar.txt,!<...
‎Nov 30, 2011
04:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
04:53 PM
No commas, the ! marks are correct, the after text is fine, everything
Sarah originally had is fine.
But the namespace declaration didn't get added properly.
It is not part of fosicite, it is its own attribute specification, so
your outspec tag should look like:
Sarah originally had is fine.
But the namespace declaration didn't get added properly.
It is not part of fosicite, it is its own attribute specification, so
your outspec tag should look like:
‎Nov 30, 2011
05:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
05:26 PM
Sarah,
I have a test doc running, so I copied the code from your email and pasted it in usetexts in the FOSI, and I got no complaints, the FOSI compiled, and "Book Title" appears in the Edit window
This is in 6.0.
Suzanne
I have a test doc running, so I copied the code from your email and pasted it in usetexts in the FOSI, and I got no complaints, the FOSI compiled, and "Book Title" appears in the Edit window
This is in 6.0.
Suzanne
‎Nov 30, 2011
05:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Nov 30, 2011
05:29 PM
I haven't done this in a very long time. But, You had the correct syntax to start with. You shouldn't need the commas in this case. Check to make sure that there isn't another tag that should be inserted. I think until you have all the tagging in, you may find errors. Go through the entire help section and make sure that you have each piece that it says to insert. I seem to recall that when I got this error, there was another tag that needed to be inserted to make it all work together. Do you have the necessary tags on the <title> elements?
Trudy
Trudy
‎Dec 01, 2011
09:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
09:57 AM
So I opened up the FOSI in a text editor and added namespace as noted below.
<outspec xmlns:atidmd="<a" style="COLOR:" blue;=" text-decoration:=" underline"=" target="_BLANK" href="http://www.arbortext.com/namespace/DocumentMetaData">">http://www.arbortext.com/namespace/DocumentMetaData">
I receive this error message "Entered attribute name (XMLNS:ATIDMD) does not exist for the current element"
What am I missing???
sarah
<outspec xmlns:atidmd="<a" style="COLOR:" blue;=" text-decoration:=" underline"=" target="_BLANK" href="http://www.arbortext.com/namespace/DocumentMetaData">">http://www.arbortext.com/namespace/DocumentMetaData">
I receive this error message "Entered attribute name (XMLNS:ATIDMD) does not exist for the current element"
What am I missing???
sarah
‎Dec 01, 2011
10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:11 AM
Sarah,
As the FOSI uses the Outspec DTD, is the XMLNS a valid attribute to be entered there? When I just checked, it is not.
Keep in mind that the FOSI is an SGML file, not XML.
Lynn
---- "Price wrote:
> So I opened up the FOSI in a text editor and added namespace as noted below.
>
>
>
> <outspec xmlns:atidmd="<a" style="COLOR:" blue;=" text-decoration:=" underline"=" target="_BLANK" href="http://www.arbortext.com/namespace/DocumentMetaData">">http://www.arbortext.com/namespace/DocumentMetaData">
>
>
>
> I receive this error message "Entered attribute name (XMLNS:ATIDMD) does not exist for the current element"
>
>
>
> What am I missing???
>
>
>
> sarah
>
>
>
As the FOSI uses the Outspec DTD, is the XMLNS a valid attribute to be entered there? When I just checked, it is not.
Keep in mind that the FOSI is an SGML file, not XML.
Lynn
---- "Price wrote:
> So I opened up the FOSI in a text editor and added namespace as noted below.
>
>
>
> <outspec xmlns:atidmd="<a" style="COLOR:" blue;=" text-decoration:=" underline"=" target="_BLANK" href="http://www.arbortext.com/namespace/DocumentMetaData">">http://www.arbortext.com/namespace/DocumentMetaData">
>
>
>
> I receive this error message "Entered attribute name (XMLNS:ATIDMD) does not exist for the current element"
>
>
>
> What am I missing???
>
>
>
> sarah
>
>
>
‎Dec 01, 2011
10:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:27 AM
Ok. So where would you add the xmlns in the FOSI?
‎Dec 01, 2011
10:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:38 AM
Between being very busy, and figuring someone would realize without me chiming in, I've been lurking on this topic.
There isn't anywhere in the FOSI that I am aware the 'xmlns' attribute would be 'legal'. Namespaces are an XML feature (thus, xml and ns as the attribute name) and not used in SGML. That means your tags are not illegal in the attempted <usetext>, unless you're trying to insert them in an SGML document.
That's the question that hasn't been asked. Is your document XML or SGML? It doesn't seem to me that Editor would allow the insertion in anything that wasn't an XML document.
$.02 or less,
Steve Thompson
+1(316)977-0515
There isn't anywhere in the FOSI that I am aware the 'xmlns' attribute would be 'legal'. Namespaces are an XML feature (thus, xml and ns as the attribute name) and not used in SGML. That means your tags are not illegal in the attempted <usetext>, unless you're trying to insert them in an SGML document.
That's the question that hasn't been asked. Is your document XML or SGML? It doesn't seem to me that Editor would allow the insertion in anything that wasn't an XML document.
$.02 or less,
Steve Thompson
+1(316)977-0515
‎Dec 01, 2011
10:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:41 AM
Yes my document is XML.
And thank you for clearing up the FOSI namespace. I haven't been able find any type of documentation on this so I was beginning to wonder. Just wanted to hear it from the experts.
And thank you for clearing up the FOSI namespace. I haven't been able find any type of documentation on this so I was beginning to wonder. Just wanted to hear it from the experts.
‎Dec 01, 2011
10:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:49 AM
There is one book written on FOSI (that I honestly have not looked at) that is relatively current.
The other places where you can find FOSI help, MIL-PRF-28001C (or MIL-PRF-28001B Amendment 1) and MIL-HDBK-28001 are both pre XML.
If you want to get hold of copies of the two MIL documents (cure for insomnia) you can get the 28001C and the handbook from the ASSIST data base.
> Yes my document is XML.
>
> And thank you for clearing up the FOSI namespace. I haven't been able find any type of documentation on this so I was beginning to wonder. Just wanted to hear it from the experts.
>
The other places where you can find FOSI help, MIL-PRF-28001C (or MIL-PRF-28001B Amendment 1) and MIL-HDBK-28001 are both pre XML.
If you want to get hold of copies of the two MIL documents (cure for insomnia) you can get the 28001C and the handbook from the ASSIST data base.
> Yes my document is XML.
>
> And thank you for clearing up the FOSI namespace. I haven't been able find any type of documentation on this so I was beginning to wonder. Just wanted to hear it from the experts.
>
‎Dec 01, 2011
10:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:50 AM
You add the xmlns attribute to the root element of your XML document. It's nowhere in the FOSI.
‎Dec 01, 2011
10:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
10:50 AM
And is the namespace declared in the document on some ancestor element (root element would cover everything, of course) of the location where the <usetext> is trying to make the insertion?
I know this sounds very step-by-step and basic, but the devil is always in the details.
Steve Thompson
+1(316)977-0515
I know this sounds very step-by-step and basic, but the devil is always in the details.
Steve Thompson
+1(316)977-0515
‎Dec 01, 2011
11:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
11:22 AM
THANK YOU STEVE!!! That did it. It all compiled as expected. Now on to more complicated endeavors.
Sarah
Sarah
‎Dec 01, 2011
11:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Dec 01, 2011
11:23 AM
Thank you too David!!
I appreciate all the responses and help!!
I appreciate all the responses and help!!