<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Lou.<div><br></div><div>I didn't even know about sgmltag. I was aware of xref and link, ulink, olink.</div><div>I'm a bit hesitant to change file names - I guess I just don't know</div><div>about how the output file names are chosen and tracked.</div><div>But there are only 55 files in question, somehow that makes it seem easier.</div><div><br></div><div>Anyway, let's look at the options you propose:</div><div><br></div><div>On Sep 3, 2008, at 8:42 AM, Lou Iorio wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Don,</div><div><br></div><div>I'm looking at <a href="http://www.openlaszlo.org/jira/browse/LPP-6904">LPP-6904</a>: reference: make sure classes and tags are up to date, e.g., lz.text instead of LzText</div><div><br></div><div>This is starting to look like a huge task, since we don't seem to have any one standard when it </div><div>comes to linking from one reference page to another. For example:</div><div><br></div><div>trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs</div><div><br></div><div>links to other pages in at least two ways:</div><div><br></div><div><div><xref linkend="LzLazyReplicationManager" /></div><div><br></div><div>and</div><div><br></div><div><sgmltag class="element" role="LzInputText">LzInputText</sgmltag></div><div><br></div><div>The second builds the HTML link from the role attribute, and the page it's</div><div>referring to is called LzInputText.html. The only problem with this is that I can't just</div><div>change instances of LzInputText to lz.inputtext, since that would result in broken</div><div>links all over the place.</div><div><br></div><div>Using an xref seems to me to be a better way, because then I could just change</div></div><div><br></div><div><sgmltag class="element" role="LzInputText">LzInputText</sgmltag></div><div><br></div><div>to</div><div><br></div><div><xref linkend="LzInputText" /></div><div><br></div><div>since that should result in the right link and the right text in the HTML.</div><div><br></div><div>My first impulse is to change all sgmltags to xrefs. That assumes that all</div><div>generated HTML files have anchors that follow this form</div></div></blockquote><div><br></div>I would assume that anchors are generated in xsl scripts, so they should all have them.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>, and I don't know </div><div>if sgmltags serve any other purpose.</div><div><br></div></div></blockquote>You got me!</div><div>Anyway xrefs seem very good - they are certainly easy to read and maintain.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Another approach would be to change the HTML file naming convention to match</div><div>the tag or class name, for example changing </div><div><br></div><div>LzInputText.html to lz.inputtext.html</div><div><br></div><div>The second way would make a global search and replace more feasible, but of course,</div><div>it's a lot more work for you.</div></div></blockquote><div><br></div><div>I think much less work for me would be to write a perl script to mod the files.</div><div><br></div><div>As I understand it, any approach needs to modify anything like this:</div><div> <sgmltag class="element" role="LzXXXX">LzXXXX</sgmltag></div><div><div><br></div><div>Do we know that LzXXXX is the same?</div><div>(i.e. if they are different, which is more reliable?)</div><div><br></div><div>Anyway, here's a simple perl script that should convert sgmltags to xref (using the 'role')</div><div><br></div><div><div>#!/usr/bin/perl -sni.orig</div><div>s:<sgmltag class="element" role="Lz([a-zA-Z0-9]*)">Lz([a-zA-Z0-9]*)</sgmltag>:<xref linkend="\1"/>:g;</div><div><br></div><div>Put that in /tmp/moddoc1.pl</div><div><br></div><div>And run 'perl -spi.orig /tmp/moddoc1.pl' on your files -- it will create *.orig files (even for files</div><div>you didn't modify, unfortunately):</div><div><br></div><div><br></div><div>dda@lester$ perl -spi.orig /tmp/moddoc1.pl /tmp/foo.txt /tmp/bar.txt </div><div><div>dda@lester$ ls -l /tmp/foo* /tmp/bar*</div><div>-rw-r--r-- 1 dda wheel 47 Sep 3 10:08 /tmp/bar.txt</div><div>-rw-r--r-- 1 dda wheel 114 Sep 3 10:08 /tmp/bar.txt.orig</div><div>-rw-r--r-- 1 dda wheel 54 Sep 3 10:08 /tmp/foo.txt</div><div>-rw-r--r-- 1 dda wheel 128 Sep 3 09:57 /tmp/foo.txt.orig</div><div>dda@lester$ diff /tmp/foo*</div><div>1c1</div><div>< <xref linkend="XYZText"/> <xref linkend="InputText"/></div><div>---</div><div>> <sgmltag class="element" role="LzXYZText">LzXYZText</sgmltag> <sgmltag class="element" role="LzInputText">LzInputText</sgmltag></div><div>dda@lester$ diff /tmp/bar*</div><div>1,2c1,2</div><div>< <xref linkend="Bar"/></div><div>< <xref linkend="Tavern"/></div><div>---</div><div>> <sgmltag class="element" role="LzBar">LzBA</sgmltag></div><div>> <sgmltag class="element" role="LzTavern">LzTaberno</sgmltag></div><div><br></div></div></div><div><br></div><div>Does that do the trick?</div><div><br></div></div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>A more search and replace based strategy would help to solve another problem, that of the</div><div>class and tag names in the source code that are not marked up at all, but just inline text,</div><div>like this from lz.datapath:</div><div><br></div><div>"When a node is replicated, an LzReplicationManager takes its place..."</div><div><br></div><div>With the current scheme, it seems I have to search the source code for every instance </div><div>of Lz[A-Z] and deal with them one at a time. I can't even hazard a guess as to how long </div><div>that would take.</div><div><br></div><div>If there's another approach I haven't thought of (which is almost certainly the case), I'd appreciate </div><div>any advice. </div><div><br></div><div>thanks,</div><div><br></div><div>Lou</div></div></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div><br>Don Anderson<br>Java/C/C++, Berkeley DB, systems consultant<br><br>voice: 617-547-7881<br>email: <a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br>www: <a href="http://www.ddanderson.com/">http://www.ddanderson.com</a><br></div></div></span></span><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>