cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Unbalanced Tag Error in FOSI Usetext

SarahPrice
10-Marble

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="!&lt;atidmd:DocumentMetaData source="atend"&gt;&lt;/atidmd:DocumentMetaData&gt;!" placemnt="before"></usetext>


<usetext source="!&lt;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

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.

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!"


Do you have a namespace declaration for atidmd in your fosi?



Try adding the following "attribute specification" to your outspec tag:


Thanks for your response. Unfortunately that didn't work.


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>!'

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.




Ok. I added the name space to the outspec tag

<outspec fosicite="xmlns:atidmd="&lt;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="!&lt;atidmd:DocumentMetaData source="atend"&gt;!,!&lt;/atidmd:DocumentMetaData&gt;!" placemnt="before"></usetext>




I think you need commas between your pseudo-tags.

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="!&lt;atidmd:DocumentMetaData&lt;br /&gt;source="atend"&gt;!,!&lt;/atidmd:DocumentMetaData&gt;!" <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


I don't think you need the exclamation marks, just the commas.

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,!<...



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,

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 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

So I opened up the FOSI in a text editor and added namespace as noted below.



<outspec xmlns:atidmd="&lt;a" style="COLOR:" blue;=" text-decoration:=" underline&quot;=" 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


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="&lt;a" style="COLOR:" blue;=" text-decoration:=" underline&quot;=" 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
>
>
>

Ok. So where would you add the xmlns in the FOSI?

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

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.

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.
>

You add the xmlns attribute to the root element of your XML document. It's nowhere in the FOSI.

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

THANK YOU STEVE!!! That did it. It all compiled as expected. Now on to more complicated endeavors.

Sarah

Thank you too David!!

I appreciate all the responses and help!!
Announcements

Top Tags