Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi,
I am trying to create some generated text in a fosi for several different attribute values for Units of Measurement. In the DTD, there is an attribute value of "%" for percentage units.
<xs:enumeration value="%"/">
Is this a reserved character in fosi? because when you choose this value in the document and then attempt to format the document, the value isn't recognized as matching anything, it generates an error in Editor:
[A27023]
The value of this <specval attval="%"> does not conform to the Declared Attribute Value (ENUMERATED) of the attribute in the document instance against which the <specval> tests
Any advice?
Thanks, KM
Hi,
I did try both of those entity values in the FOSI attval but they produce the same error as before. I could get it to work if I could change the enumerated value in the Schema file, but I can't do that. I guess the writers will have to live with not seeing the percent sign when they generate proofs unless I can come up with some other solution.
Thanks for the info.
KM
Kim,
Try using the following in your <specval...> :
<specval attloc="" attname="" attval="#EQ#\%">
Obviously, attloc and attname need something. The attloc can be omitted if testing on the attribute on the same element the <specval> is within. Thissyntax says you want something "EQual" to a delimited "%".
I tried this on one of my SGML documents and it worked fine, so I would expect it would work on your XML as well.
Hope this helps,
Bob
Lynn - I am just trying to spit out a generated % sign when the writer chooses the attribute value "%" for a quantity UOM. It is S1000D procedural DMs and the schema uses the "%" for the attribute value so I can't change it 😞 I am using FOSI to develop print output for their review PDFs. This is the only unit that doesn't work and I figured it is because it was a reserved character. Just looking for a way around it.
Bob - I will try that trick when I get back to the office and see what happens.
Thanks, KM
Bob - I did try your suggestion, but the FOSI still complains about it not matching the enumerated value.
Lynn - I tried your fillval suggestion and that actually works. Unfortunately, it works too well. For some reason, it is also displaying the attribute value for every specval I have defined as well. So except for the % value (which is displayed just once), I am getting the attribute value + the usetext value displayed on the page - like this: V V or in in etc.. I'm not sure why. I will read that document you referred to.
It is a schema: it is declared like this -
<xs:attribute name="quantityUnitOfMeasure" type="quantityUnitOfMeasureAttType"/">
<xs:simpletype name="quantityUnitOfMeasureAttType">
<xs:restriction base="xs:string">
<xs:enumeration value="%"/">
KM
Lynn - Yes, I realized that the attval was invalid.
My problem is that although it would be easier to just use a fillval to generate the text for every possible value of the attribute by using the value of the source, there are many exceptions where the attribute value is not what is wanted for display, e.g., instead of "deg" they want to see the degree symbol, instead of the word "plus" it should be the plus symbol, etc. That's why I went with individual specvals to determine the content for display even though it was a tedious way to do it. I'm no FOSI expert so I probably am doing things the wrong way around.
If you can help me get just this percent sign working, I'd be glad to take it offline.Do you need my email address?
KM