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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Showing colspec values in editor

ptc-3063012
1-Newbie

Showing colspec values in editor

Hello,


Most of our editors prefer to work in partial tag mode. The main concern they flagged working in partial mode is inability to see/edit the colspec attribute. Ofcourse editing is lot simpleri.e, they right click and choose modify attributes>column which gives the ability to modify colspec attributes. However they would like to see the actual attributes of colspec.


I indeed created some generated text for colspec element in styler but those are only visible in table markup mode and not in table grid mode. They are even okay with full tag enabled for colspec element and so I tried


tag_display -full colspec


but that does not work.


Is there a way to show the colspec information in editor view?


Thanks in advance.


Karthik

9 REPLIES 9

Try creating the generated text from the context of the table element.
That should (I think) show up in table markup mode or table grid
mode.

-Brandon 🙂


On Mon, Oct 31, 2011 at 6:40 AM, Karthik Kumar
<karthik.kumar@merrillcorp.com> wrote:
> Hello,
>
> Most of our editors prefer to work in partial tag mode. The main concern
> they flagged working in partial mode is inability to see/edit the colspec
> attribute. Ofcourse editing is lot simpleri.e, they right click and choose
> modify attributes>column which gives the ability to modify colspec
> attributes. However they would like to see the actual attributes of colspec.
>
> I indeed created some generated text for colspec element in styler but those
> are only visible in table markup mode and not in table grid mode. They are
> even okay with full tag enabled for colspec element and so I tried
>
> tag_display -full colspec
>
> but that does not work.
>
> Is there a way to show the colspec information in editor view?
>
> Thanks in advance.
>
> Karthik
>
> ----------

Thanks Brandon. In Styler I did the following,


1. Edited the <table> element


2. Selected the GenText Tab and click on Add Before button. It opened the Add Before Table element dialog


3. Selected Insert>Attribute Content


4. It opened modify attribute content dialog box


5. Set the properties as per the screenshot attached - By name and occurrence within ancestor


6. Name: Colspec; Occurence: 1st; Within; table


7. Attribute to insert: colwidth


But this does not display the attribute content in <table> tag.


When you say context, does the above steps is the right approach?


Karthik

Sorry, the attachement

This approach is limited to just grabbing the one attribute from the
one instance of colspec, but it seems like you'll need to display
information for each colspec. For that, I'd use Insert>Element
Content (or possibly "Elements via XPath" or something to that effect,
depending on which version of Styler you're working in) and an XPath
of something like ".//colspec".

You'll need to process the colspecs specially, which you can
accomplish by wrapping the "Element Content" in a UFE, then creating a
context for "colspec" where it is has an ancestor of that UFE and
putting your generated text rule there. That generated text can use
whatever combination of literal text, attributes from colspec and any
other formatting needed to get the affect you want.

-Brandon 🙂


On Mon, Oct 31, 2011 at 7:01 AM, Karthik Kumar
<karthik.kumar@merrillcorp.com> wrote:
> Thanks Brandon. In Styler I did the following,
>
> 1. Edited the <table> element
>
> 2. Selected the GenText Tab and click on Add Before button. It opened the
> Add Before Table element dialog
>
> 3. Selected Insert>Attribute Content
>
> 4. It opened modify attribute content dialog box
>
> 5. Set the properties as per the screenshot attached - By name and
> occurrence within ancestor
>
> 6. Name: Colspec; Occurence: 1st; Within; table
>
> 7. Attribute to insert: colwidth
>
> But this does not display the attribute content in <table> tag.
>
> When you say context, does the above steps is the right approach?
>
> Karthik
>
> -----End Original Message-----

And WYSIWYG is a bad thing? This is a lot of bother to just see a table.

One of our developers is having trouble with some VB6 code that works fine with Arbortext Editor 5.2 in Windows XP but does not work in Windows 7.

Here are the code lines:
Set epicWin = EpicAcl.GetWindow(winID)
If Not epicWin Is Nothing Then epicWin.BringToFront

Does anyone have a clue?




When I do a search/replace across a document set, I often run into issues with my source control system due to changes in line breaks between the result of my batch update and what Arbortext does.

For example, Arbortext might write

Some text <xref href="&lt;a" style="COLOR:" blue;=" text-decoration:=" underline&quot;=" target="_BLANK" href="http://www.google.com">http://www.google.com
>Some more text</xref>...

And my batch might change that to

Some text <xref href="&lt;a" style="COLOR:" blue;=" text-decoration:=" underline&quot;=" target="_BLANK" href="http://www.google.com">Some">http://www.google.com>Some more text
</xref>...

Those two lines will conflict due to the line oriented nature of my diff tool.

What I'd like to be able to do is make my batch change, then, in a batch process, open the changed files in Arbortext, saving them all, so that I get Arbortext's line wrapping.

Is there a way to do that?

Steve

HiKarthik,

I don't know if this will help or not ...

If I correctly understand what you want to do, the following FOSI code shows how to output column widths from <thead>. This displays when table tags are set to full, partial, or none, but does not appear in the WYSIWYG view. The columns widths could be output from <tbody> and/or every nth <row>, if desired. Note that the code supports up to 4 columns. The relevant code would need to be repeated for the maximum number of columns that could occur.

This works in a FOSI stylesheet for screen display. I don't know if source edits could be made in Styler to support this.

Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"

<counter initial="0" style="arabic" enumid="columnct">
<counter initial="0" style="arabic" enumid="number-of-columnsct">
<stringdecl textid="colspec1.txt" literal="">
<stringdecl textid="colspec2.txt" literal="">
<stringdecl textid="colspec3.txt" literal="">
<stringdecl textid="colspec4.txt" literal="">

<charsubset charsubsetid="yellow-background">
<highlt inherit="1" bckclr="#FFFF00">
</charsubset>

<e-i-c gi="colspec">
<charlist inherit="1">
<enumerat increm="1" enumid="columnct">
<usetext source="&lt;columnct.psu">,</columnct.psu>"></usetext>
</charlist>
</e-i-c>
<e-i-c gi="columnct.psu">
<charlist inherit="1"></charlist>
<att>
<specval attname="columnct" attloc="#FOSI" attval="1">
<fillval attname="colwidth" attloc="colspec" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="colspec1.txt">
</charsubset>
</att>
<att>
<specval attname="columnct" attloc="#FOSI" attval="2">
<fillval attname="colwidth" attloc="colspec" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="colspec2.txt">
</charsubset>
</att>
<att>
<specval attname="columnct" attloc="#FOSI" attval="3">
<fillval attname="colwidth" attloc="colspec" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="colspec3.txt">
</charsubset>
</att>
<att>
<specval attname="columnct" attloc="#FOSI" attval="4">
<fillval attname="colwidth" attloc="colspec" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="colspec4.txt">
</charsubset>
</att>
</e-i-c>
<e-i-c gi="row">
<charlist inherit="1" charsubsetref="block">
<reset resetlist="columnct">
</charlist>
</e-i-c>
<e-i-c gi="table">
<charlist inherit="1">
<reset resetlist="columnct" number-of-columnsct&quot;=">
<savetext textid="column1.txt" conrule="\\">
<savetext textid="column2.txt" conrule="\\">
<savetext textid="column3.txt" conrule="\\">
<savetext textid="column4.txt" conrule="\\">
</charlist>
</e-i-c>
<e-i-c gi="tgroup">
<charlist inherit="1"></charlist>
<att>
<fillval attname="cols" fillcat="enumerat" fillchar="increm">
<charsubset>
<enumerat enumid="number-of-columnsct" setvalue="1">
</charsubset>
</att>
</e-i-c>
<e-i-c gi="thead">
<charlist inherit="1"></charlist>
<att>
<specval attname="number-of-columnsct" attloc="#FOSI" attval="1">
<charsubset>
<usetext source="\Col1" ==" \,colspec1.txt,&quot;=">
<subchars charsubsetref="block" bold=" yellow-background&quot;="></subchars>
</usetext>
</charsubset>
</att>
<att>
<specval attname="number-of-columnsct" attloc="#FOSI" attval="2">
<charsubset>
<usetext source="\Col1" ==" \,colspec1.txt,\,=" col2="\,colspec2.txt">
<subchars charsubsetref="block" bold=" yellow-background&quot;="></subchars>
</usetext>
</charsubset>
</att>
<att>
<specval attname="number-of-columnsct" attloc="#FOSI" attval="3">
<charsubset>
<usetext source="\Col1" ==" \,colspec1.txt,\,=" col2="\,colspec2.txt,\," col3="\,colspec3.txt">
<subchars charsubsetref="block" bold=" yellow-background&quot;="></subchars>
</usetext>
</charsubset>
</att>
<att>
<specval attname="number-of-columnsct" attloc="#FOSI" attval="4">
<charsubset>
<usetext source="\Col1" ==" \,colspec1.txt,\,=" col2="\,colspec2.txt,\," col3="\,colspec3.txt,\," col4="\,colspec4.txt">
<subchars charsubsetref="block" bold=" yellow-background&quot;="></subchars>
</usetext>
</charsubset>
</att>
</e-i-c>



An alternative to Clay's suggestion would be to use either an XML-aware diff
or simply normalise the XML spacing and line breaks for comparison purposes
(eg. run xmllint -format or xmltidy over all files prior to comparison). My
source control client (TortoiseSVN) lets me configure customised diffing
tools.



Just another idea.



-G


Top Tags