<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Structured Authoring &#187; Perl</title>
	<atom:link href="http://structuredauthoring.org/category/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://structuredauthoring.org</link>
	<description>Learning Structured Authoring - Tools and Processes</description>
	<lastBuildDate>Fri, 14 Jan 2011 18:10:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Wiki Help Files</title>
		<link>http://structuredauthoring.org/sa/wiki-help-file/</link>
		<comments>http://structuredauthoring.org/sa/wiki-help-file/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 15:00:15 +0000</pubDate>
		<dc:creator>douglaspaulwade</dc:creator>
				<category><![CDATA[ACL]]></category>
		<category><![CDATA[Arbortext Editor]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Structured Authoring]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://structuredauthoring.org/?p=409</guid>
		<description><![CDATA[One thing that I think about all the time is how to improve documentation. One thing I would like to have is documentation that is context sensitive in Arbortext and collaborative.  At work we have a style guide which determines &#8220;what&#8221; we are to do but rather than &#8220;how&#8221; to do it.  Many years ago, [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that I think about all the time is how to improve documentation. One thing I would like to have is documentation that is context sensitive in Arbortext and collaborative.  At work we have a style guide which determines &#8220;what&#8221; we are to do but rather than &#8220;how&#8221; to do it.  Many years ago, I placed all of the &#8220;how to&#8221; documentation into Microsoft Word, saved it out as PDF, yet I struggled with this. Next, I desired to work more in XML, so I adopted Docbook. All the Microsoft documents were converted to Docbook which I pushed out, HTML pages, PDF files, and Microsoft Help (.chm) files.</p>
<p>The biggest issue was that I was the single bellybutton to all the documentation. I strived for a collaborative solution. I worked with Wiki&#8217;s and set out to install one. Our corporate structure would not allow me to install one. The company had just created one, and they only wanted one in the company culture. I was not sure that I wanted all my documentation out there for all to see. Because I work for a large aerospace company. However, I got over it; it was more important to have collaborative tools rather than my pride. I imported all the docbook information into our Wiki.</p>
<p>The biggest complaint of the wiki was its weak search. I wanted a way for a writer who is authoring in a SGML/XML file, to hit the help button and go to an exact area in the documentation. The Arbortext Editor has the Shift-F1 to present a customized help. I played with it trying to add hyperlinks to those files. With the help of the <a href="http://portal.ptcuser.org/l/pw/rs">adepters</a> mailing list and <a href="mailto:chelberg@terraxml.com">Clay Helberg</a> (a Arbortext guru), he mentioned a few things, one being of which is remapping the Shift-F1 key. The other is how to open a file. So, I used the <em>browse_url</em> function which launches a HTML page, in my case a Wiki page. I needed to add more information in the URL based on the two things: the DTD name and element name. In the Wiki, I am using subpages which are like a collection. All pages will be a subpages grouped in &#8220;Structured-Elements&#8221; and also &#8220;38784&#8243; (the DTD name) followed by the tag name. The tag is found using the ACL functions of  <em>oid_name(oid_caret())</em>. The <em>oid_caret</em> is the cursor position and <em>oid_name</em> is the name of the element. So below is the code snippet: I placed it inside my ACL file located at  (&lt;arbortext-home&gt;/custom/editinit) which gets sourced when a document is opened.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re0">$dtd</span> = public_id<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="kw1">if</span> <span class="br0">&#40;</span>match<span class="br0">&#40;</span><span class="re0">$dtd</span>,<span class="st0">&quot;38784&quot;</span> <span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<a href="http://perldoc.perl.org/functions/map.html"><span class="kw3">map</span></a> shift-f1 <span class="br0">&#123;</span> browse_url<span class="br0">&#40;</span><span class="st0">&quot;http://wiki.yourcompany.com/wiki/Structured-Elements/&quot;</span> . &nbsp;<span class="st0">&quot;38784/&quot;</span> . oid_name<span class="br0">&#40;</span>oid_caret<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p>When the writers place the cursor inside an element, for example,  &lt;title&gt;, and then does a Shift-F1, the Arbortext Editor will open to a Wiki page by element and DTD name.</p>
<p>That was the easy part, now is the hard part; populating the Wiki with content on the elements. With Mil-Spec DTD&#8217;s (some of our work uses them), we have a TDT file (it contains all the element names and attributes with descriptions). My co-worker, Joe, our other Software Engineer, wrote a Perl script to convert each element to a Wiki page. I will import a couple of hundred new Wiki pages here in the next few days.</p>
<p>The final part is adding extra links in these new pages to the established Wiki pages, therefore linking the entire project together.</p>
]]></content:encoded>
			<wfw:commentRss>http://structuredauthoring.org/sa/wiki-help-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running a Perl Script in Arbortext IsoDraw</title>
		<link>http://structuredauthoring.org/arbrtext-isodraw/running-a-perl-script-in-arbortext-isodraw/</link>
		<comments>http://structuredauthoring.org/arbrtext-isodraw/running-a-perl-script-in-arbortext-isodraw/#comments</comments>
		<pubDate>Mon, 25 May 2009 20:09:45 +0000</pubDate>
		<dc:creator>douglaspaulwade</dc:creator>
				<category><![CDATA[Arbrtext IsoDraw]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://structuredauthoring.org/?p=171</guid>
		<description><![CDATA[Running a Perl script from inside PTC&#8217;s Arbortext IsoDraw in a Window&#8217;s CMD shell. The example below is very simple but demonstrates what can be done with Perl. First you will need a Perl program. I will use Hello World printed to screen as an example. Place the following code  inside a file called &#8220;hello.pl&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Running a Perl script from inside PTC&#8217;s Arbortext IsoDraw in a Window&#8217;s CMD shell. The example below is very simple but demonstrates what can be done with Perl.</p>
<p>First you will need a Perl program. I will use <strong>Hello World</strong> printed to screen as an example. Place the following code  inside a file called &#8220;<strong>hello.pl</strong>&#8221; and save it at <strong>C:\hello.pl</strong>.</p>
<div class="dean_ch" style="white-space: wrap;"><a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;Hello World<span class="es0">\n</span>&quot;</span>;</div>
<p>Second, create a file called &#8220;<strong>hello.ism</strong>&#8220;:</p>
<div class="dean_ch" style="white-space: wrap;">MACRO hello<br />
Launch &quot;C:\WINDOWS\system32\cmd.exe&quot; &quot;/k c:\hello.pl&quot;<br />
END MACRO</div>
<p><span class="postbody">Here is the syntax: Use the keyword <strong>Launch </strong>and the path to Window&#8217;s command shell. The switch (option) <strong>/k</strong> keeps the command window open. You can use <strong>/c</strong> to close the command window, but since we are wanting to see the results printed, we will leave the CMD shell open. Enter the full pathname and Perl file name, (e.g., c:\hello.pl)</span></p>
<p><span class="postbody">Place the &#8220;<strong>hello.ism</strong>&#8221; inside the Macros folder. For example, my installation is: <strong>C:\Program Files\PTC\Arbortext IsoDraw 7.0\Program\Macros&#8221;. </strong></span></p>
<p><span class="postbody">Third, launch IsoDraw. <strong>Start &gt; Program Files &gt; PTC &gt; Arbortext IsoDraw 7.0 &gt; </strong></span><span class="postbody"><strong>Arbortext IsoDraw 7.0</strong></span><span class="postbody"><br />
</span></p>
<p><span class="postbody">To  launch a Perl script from a batch file</span><span class="postbody"> (.ism)</span><span class="postbody">, from the menu: <strong>Macros &gt; hello.</strong><br />
</span></p>
<div id="attachment_173" class="wp-caption alignnone" style="width: 172px"><img class="size-full wp-image-173" title="Hello Macro" src="http://structuredauthoring.org/wp-content/uploads/2009/05/id-hello.png" alt="Hello Macro" width="162" height="147" /><p class="wp-caption-text">Hello Macro</p></div>
<p><span class="postbody">The script will run and print the results in an open CMD shell and print &#8220;<strong>Hello World</strong>&#8220;.</span></p>
<div id="attachment_174" class="wp-caption alignnone" style="width: 309px"><img class="size-full wp-image-174" title="Hello World" src="http://structuredauthoring.org/wp-content/uploads/2009/05/id-cmd.png" alt="Hello World" width="299" height="99" /><p class="wp-caption-text">Perl Results. &quot;Hello World&quot;</p></div>
<p>Again, this is a simple example but it does show how to launch Perl from IsoDraw.</p>
]]></content:encoded>
			<wfw:commentRss>http://structuredauthoring.org/arbrtext-isodraw/running-a-perl-script-in-arbortext-isodraw/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

