<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://community.moertel.com/ss/rdf'>
    <s:Snip rdf:about='http://community.moertel.com/ss/rdf#PXSL+FAQs'
         s:cUser='tmoertel'
         s:oUser='tmoertel'
         s:mUser='tmoertel'>
        <s:name>PXSL FAQs</s:name>
        <s:content>&#xA;&#xA;Here are the answers to oft-received PXSL questions.  If your question&#xA;isn&apos;t answered below, please ask it in the [PXSL Ask-a-Question]&#xA;section.&#xA;&#xA;&#xA;1 Table of contents&#xA;&#xA;__General questions__&#xA;    - What is PXSL?&#xA;    - Does PXSL replace or compete with XML?&#xA;    - What are your goals for PXSL?&#xA;    - How does PXSL differ from other XML shorthands?&#xA;    - Why does PXSL have a macro system?&#xA;&#xA;__Using PXSL__&#xA;    - How can I convert existing XML documents into PXSL?&#xA;    - How does pxslcc handle tabs in PXSL source documents?&#xA;&#xA;&#xA;1 General questions&#xA;&#xA;The follwing are questions about the PXSL project, why it is the way&#xA;it is, and how it fits into the world.  If you want to know something&#xA;about the PXSL tools, skip to the next section, &quot;Using PXSL,&quot; below.&#xA;&#xA;1.1 What is PXSL?&#xA;&#xA;PXSL is the Parsimonious XML Shorthand Language.  It provides XML&#xA;authors and programmers with a simple, concise syntax that they can&#xA;use to create XML documents.&#xA;&#xA;For more advanced users, PXSL offers customizable shortcuts and&#xA;sophisticated refactoring tools like functional macros that can&#xA;markedly reduce the size and complexity of markup-dense XML documents.&#xA;But simplicity and consistency are the top priority.  The advanced&#xA;features are hidden away until users are ready to use them.&#xA;&#xA;The official PXSL documentation and downloads are located at&#xA;http://community.moertel.com/pxsl/ .&#xA;(Source code and binary downloads are available.)&#xA;&#xA;1.1 Does PXSL replace or compete with XML?&#xA;&#xA;No.  PXSL is a shorthand for writing XML.  It does not replace or&#xA;compete with XML.  Rather, it lets you write XML documents by using an&#xA;alternative syntax that is more convenient for markup-dense&#xA;applications, such as XSLT, Ant build files, or RDF.&#xA;&#xA;1.1 What are your goals for PXSL?&#xA;&#xA;PXSL was designed with the following goals in mind:&#xA;&#xA;- PXSL must be open source.&#xA;- PXSL must be easy to read, write, and edit.&#xA;- PXSL&apos;s syntax must be simple, consistent, and ~~concise.~~&#xA;- PXSL must reduce markup and syntactical noise in data-centric XML documents.&#xA;- Any feature that we add to PXSL must provide benefits that substantially outweigh the burden that the feature&apos;s addition places upon users. (Therefore, advanced features should be invisible until they are called upon to provide compelling benefits.)&#xA;- It must be easy to intermix XML and PXSL within a single PXSL document.&#xA;- PXSL must be extensible in order to allow sophisticated users and programmers to incorporate application-specific customizations and shortcuts.&#xA;&#xA;1.1 How does PXSL differ from other XML shorthands?&#xA;&#xA;There are at least a dozen other shorthands for XML and XML-like languages.&#xA;Here are a few:&#xA;&#xA;- {link:DL|http://www.notdotnet.org/dl/}&#xA;- {link:ONX|http://www.seairth.com/web/onx/onx.html}&#xA;- {link:PYX|http://pyxie.sourceforge.net/}&#xA;- {link:S(cheme)XML|http://okmij.org/ftp/Scheme/SXML-short-paper.html}&#xA;- {link:SOX|http://www.langdale.com.au/SOX/} (Simple Outline XML)&#xA;- {link:Tanga|http://wiki.truemesh.com/tanga/TangaSyntax} (project seems to have died)&#xA;- {link:Terse XML|http://jsalz.net/txml/}&#xA;- {link:XSLScript|http://www.pault.com/XSLScript/pault/prod/XSLScript}&#xA;- {link:XSLtxt|http://savannah.gnu.org/projects/xsltxt}&#xA;- {link:YAML|http://www.yaml.org/} (not isomorphic to XML)&#xA;&#xA;PXSL differs from these other shorthands in some or all of the following ways:&#xA;&#xA;- __PXSL combines simplicity, generality, extensibility, and constrained programmability__ into one cohesive language that complements rather than competes with XML.&#xA;- __PXSL lets users intermix PXSL and XML syntax__ in one document.  Users are free to use whichever syntax works best for each portion of their documents.  (In other words, PXSL doesn&apos;t lock users into its syntax.)&#xA;- __PXSL scales to the needs of each user.__  PXSL offers beginning users a simple, easy-to-understand shorthand that they can be productive with immediately.  Yet advanced users will find that PXSL provides a rich set of tools for constructing and refactoring complex, data-centric documents.  PXSL burdens neither class of users with the other&apos;s concerns.&#xA;- __PXSL can be customized with application-specific shortcuts.__&#xA;- __PXSL has a powerful hygienic macro system__ that can be used to build complicated document structures safely and conveniently.&#xA;&#xA;1.1 Why does PXSL have a macro system?&#xA;&#xA;In short, because the macro system has proven itself to be surprisingly useful.  (See, for example, {link:Refactoring XSLT one-offs with PXSL|http://www.kuro5hin.org/story/2003/6/4/12434/75716}.)&#xA;&#xA;The long answer is has to do with {link:XML&apos;s design goals|http://www.w3.org/TR/REC-xml#sec-origin-goals}, goals 4 and 10 in particular:&#xA;&#xA;&#xA;- 4. It shall be easy to write programs which process XML documents.&#xA;- 10. Terseness in XML markup is of minimal importance.&#xA;&#xA;XML is syntactically noisy in order to make the job of&#xA;writing programs that process XML easier.  The scales were&#xA;tipped to make XML users carry more baggage so that XML implementors&#xA;have to carry less.  (And this was probably a good decision: If XML&#xA;wasn&apos;t easy to implement, there would have been few initial&#xA;implementations to attract the community of users that have made XML&#xA;so popular today.)&#xA;&#xA;This design philosophy carries into many applications that are built&#xA;on top of XML (e.g., XSLT).  In the same way that XML makes users&#xA;write more markup in order to create any given bit of document&#xA;structure, many XML-based applications make users create&#xA;more document structure in order to express any given bit of&#xA;application-specific data.  It&apos;s a double-whammy.&#xA;&#xA;PXSL, in contrast to XML, was designed with the opposite conviction:&#xA;We (the guys creating PXSL) were willing to invest lots of time and&#xA;effort in writing complicated parsers and processors, if it meant that&#xA;the PXSL user&apos;s burden was correspondingly reduced.  We wanted to see&#xA;how far we could tip the scales in the user&apos;s favor.&#xA;&#xA;PXSL&apos;s outline-based syntax does a good job of reducing the syntax verbosity that XML imposes, but it doesn&apos;t help with markup verbosity that many XML applications impose.&#xA;That&apos;s what the macros are for.  PXSL lets you create small macros that&#xA;create verbose application-specific structures for you.&#xA;&#xA;1 Using PXSL&#xA;&#xA;The following questions are about using PXSL and the PXSL tools, __pxslcc__ being the most prominent.&#xA;&#xA;1.1 How can I convert existing XML documents into PXSL?&#xA;&#xA;Included in the {link:PXSL source-code distribution|http://community.moertel.com/pxsl/sources/} is an XSLT&#xA;stylesheet called __xsl2pxsl.xsl__.  It was originally created to&#xA;convert XML-based XSLT stylesheets into PXSL (hence its name), but it&#xA;works just as well as a general XML-to-PXSL convsion tool.  It&apos;s imperfect, and its output isn&apos;t nearly as crisp and compact as hand-written PXSL, but it&apos;s a good starting point, especially if you are migrating an established repository to PXSL.&#xA;&#xA;&#xA;1.1 How does pxslcc handle tabs in PXSL source documents?&#xA;&#xA;It doesn&apos;t.  It rejects them.&#xA;&#xA;Tabs are fragile, fickle things that often get lost or damaged in transit and mean different things in different computing environments.  Does a tab represent four spaces?  Eight?  Something else?  It depends.  There is no One Right Way.  For this reason, __pxslcc__ generates an error when it encounters tabs in the layout (indented) portions of documents.  (Yes, you ~~can~~ use tabs inside of text and mixed-content literals.)  &#xA;&#xA;The best advice I have is not to embed ASCII TAB characters in your documents.  If you must use them, expand them yourself before giving your documents to __pxslcc__.  That&apos;s what the Unix __expand__ utility is for:&#xA;&#xA;{code}&#xA;expand -4 myfile.pxsl | pxslcc &gt; myfile.xml&#xA;{code}&#xA;&#xA;</s:content>
        <s:mTime>2003-08-22 13:54:52.904</s:mTime>
        <s:cTime>2003-06-10 17:09:13.336</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#pxsl'/>
                <rdf:li rdf:resource='#PXSL'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#pxsl/'/>
                <rdf:li rdf:resource='#tmoertel'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#PXSL Examples'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#PXSL Feedback'/>
                <rdf:li rdf:resource='#snipsnap-help'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#space/PXSL FAQs'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#IMDB Movie-Rating Decoder Ring'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#PXSL Ask-a-Question'/>
                <rdf:li>
                    <s:Snip rdf:about='http://community.moertel.com/ss/rdf#PXSL+FAQs'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#A Coder&apos;s Guide To Coffee'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#2003-06-10'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#Tom&apos;s Perl code'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#Tom&apos;s Bash shell code'/>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#PXSL+Examples'/>
                <rdf:li rdf:resource='#Haskell'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#imdb movie-rating decoder ring'/>
                <rdf:li rdf:resource='http://community.moertel.com/ss/rdf#2003-07-12'/>
                <rdf:li rdf:resource='#snipsnap-portlet-1'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>
