Permalink
Browse files

a new XLDF command: hyperlinkify; use of xldf:hyperlinkify for XBGF m…

…anual

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@771 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Feb 16, 2010
1 parent 6598b91 commit 45a26369f0c1d21fb283ff0b9e9c9c96b8124dac
@@ -8,6 +8,20 @@
sectionRoles = ('synopsis','description','syntax','constraints','relationship','semantics','default','rationale','example','update','section')
# Commands
def xldf_hyperlinkify(localpath,cmd,tree):
where = tree.findall(cmd.findtext('goal'))
if where:
el = ET.SubElement(where[0],'link')
ET.SubElement(el,'text').text = where[0].text
ET.SubElement(el,'external').text = cmd.findtext('uri')
#el.attrib['href'] = cmd.findtext('uri')
#el.text = where[0].text
where[0].text = ''
print '[XLDF] hyperlinkify(',cmd.findtext('goal'),',',cmd.findtext('uri'),')'
else:
print '[----] xldf:hyperlinkify: goal',cmd.findtext('goal'),'not found'
return
def xldf_insert(localpath,cmd,tree):
if cmd.findall('*')[0].findall('*')[0].tag != 'text':
xldf_insert_symbolic(localpath,cmd,tree)
View
@@ -890,7 +890,7 @@
<xsd:annotation>
<xsd:documentation>
The value that the sample should yield if parsed and
evalutated in the specified language.
evaluated in the specified language.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
@@ -985,7 +985,10 @@
<xsd:sequence>
<!--<xsd:element name="text" type="xsd:string"/>-->
<xsd:element name="text" type="xsd:string" minOccurs="0"/>
<xsd:element name="reference" type="xsd:string"/> <!--IDREF -->
<xsd:choice>
<xsd:element name="reference" type="xsd:string"/> <!--IDREF -->
<xsd:element name="external" type="xsd:anyURI"/> <!--IDREF -->
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
View
@@ -43,6 +43,7 @@
<xsd:element ref="xldf:combine"/>
<xsd:element ref="xldf:drop"/>
<xsd:element ref="xldf:extractSubsection"/>
<xsd:element ref="xldf:hyperlinkify"/>
<xsd:element ref="xldf:insert"/>
<xsd:element ref="xldf:importGrammar"/>
<xsd:element ref="xldf:importSample"/>
@@ -195,6 +196,20 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="hyperlinkify">
<xsd:annotation>
<xsd:documentation>
Turns a document part referenced by an XPath expression into a hyperlink.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="goal" type="xsd:string"/>
<xsd:element name="uri" type="xsd:anyURI"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="importGrammar">
<xsd:annotation>
<xsd:documentation>
View
@@ -220,8 +220,15 @@
<strong xmlns="http://www.w3.org/1999/xhtml">
<a>
<xsl:attribute name="href">
<xsl:text>#</xsl:text>
<xsl:value-of select="reference"/>
<xsl:choose>
<xsl:when test="reference">
<xsl:text>#</xsl:text>
<xsl:value-of select="reference"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="external"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="text"/>
</a>
@@ -7,6 +7,10 @@
xmlns:xldf="http://planet-sl.org/xldf">
<!-- beautify bgf -->
<xldf:hyperlinkify>
<goal>frontMatter/normativeReferences/content/list/item</goal>
<uri>http://slps.svn.sourceforge.net/viewvc/slps/shared/xsd/bgf.xsd</uri>
</xldf:hyperlinkify>
<xldf:transformGrammar>
<target>scope</target>
<xbgf:vertical>
View
@@ -1,14 +1,10 @@
Hostname = shell.sourceforge.net
Username = rlaemmel
ProjectGroupDirectory = /home/groups/s/sl/slps
ProjectWebDirectory = ${ProjectGroupDirectory}/htdocs
ProjectWebCGIScriptDirectory = ${ProjectGroupDirectory}/cgi-bin
all:
upload:
scp index.html rlaemmel,slps@web.sourceforge.net:htdocs
#scp index.html ${Username}@${Hostname}:${ProjectWebDirectory}
sync:
rsync -avz --exclude=".svn" --exclude="Makefile" * sspider,slps@web.sourceforge.net:htdocs
clean:
rm -f *~
View
@@ -30,13 +30,13 @@
</style></head><body><h1>
BGF transformation operator suite
v.1.0<br></br><span class="date">2010-02-15</span></h1><h2><a name="foreword"></a>Foreword</h2>
v.1.0<br></br><span class="date">2010-02-16</span></h1><h2><a name="foreword"></a>Foreword</h2>
This chapter describes the transformational suite for BGF and all the details about it.
Most of the information present here is located in the XML Schema definition of the
language, part of the SLPS project. The rest was introduced by the language documentation
transformation commands in the process of automated generation of the manual in its
present form.
<h2><a name="normativeReferences"></a>Normative references</h2><ul><li>bgf.xsd</li></ul><h2>Table of contents</h2><ol><li><a href="#foreword">Foreword</a></li><li><a href="#normativeReferences">Normative references</a></li><li><a href="#designGoals">Design goals</a></li><li><a href="#notation-section">Notation</a></li><li><a href="#folding-unfolding-transformation">Folding and unfolding transformations</a><ol><li><a href="#unfold">unfold</a></li><li><a href="#fold">fold</a></li><li><a href="#inline">inline</a></li><li><a href="#extract">extract</a></li><li><a href="#abridge">abridge</a></li><li><a href="#detour">detour</a></li><li><a href="#unchain">unchain</a></li><li><a href="#chain">chain</a></li></ol></li><li><a href="#refactoring-transformation">Other refactoring transformations</a><ol><li><a href="#massage">massage</a></li><li><a href="#distribute">distribute</a></li><li><a href="#factor">factor</a></li><li><a href="#deyaccify">deyaccify</a></li><li><a href="#yaccify">yaccify</a></li><li><a href="#eliminate">eliminate</a></li><li><a href="#introduce">introduce</a></li><li><a href="#import">import</a></li><li><a href="#vertical">vertical</a></li><li><a href="#horizontal">horizontal</a></li><li><a href="#rassoc">rassoc</a></li><li><a href="#lassoc">lassoc</a></li><li><a href="#equate">equate</a></li></ol></li><li><a href="#increasing-transformation">Grammar lengthening transformations</a><ol><li><a href="#add">add</a></li><li><a href="#appear">appear</a></li><li><a href="#widen">widen</a></li><li><a href="#upgrade">upgrade</a></li><li><a href="#unite">unite</a></li></ol></li><li><a href="#decreasing-transformation">Grammar shortening transformations</a><ol><li><a href="#remove">remove</a></li><li><a href="#disappear">disappear</a></li><li><a href="#narrow">narrow</a></li><li><a href="#downgrade">downgrade</a></li></ol></li><li><a href="#concrete-revising-transformation">Refactorings in term-oriented semantics</a><ol><li><a href="#abstractize">abstractize</a></li><li><a href="#concretize">concretize</a></li><li><a href="#permute">permute</a></li></ol></li><li><a href="#abstract-revising-transformation">Semantics revising transformations</a><ol><li><a href="#define">define</a></li><li><a href="#undefine">undefine</a></li><li><a href="#redefine">redefine</a></li><li><a href="#inject">inject</a></li><li><a href="#project">project</a></li><li><a href="#replace">replace</a></li></ol></li><li><a href="#decorative-transformation">Decorative transformations</a><ol><li><a href="#designate">designate</a></li><li><a href="#unlabel">unlabel</a></li><li><a href="#deanonymize">deanonymize</a></li><li><a href="#anonymize">anonymize</a></li></ol></li><li><a href="#dump">dump</a></li><li><a href="#rename">rename</a><ol><li><a href="#renameL">renameL</a></li><li><a href="#renameN">renameN</a></li><li><a href="#renameS">renameS</a></li><li><a href="#rename-terminal">renameT</a></li></ol></li><li><a href="#reroot">reroot</a></li><li><a href="#compatibility-section">Compatibility</a></li></ol><h2><a name="designGoals"></a>Design goals</h2>
<h2><a name="normativeReferences"></a>Normative references</h2><ul><li><strong><a href="http://slps.svn.sourceforge.net/viewvc/slps/shared/xsd/bgf.xsd">bgf.xsd</a></strong></li></ul><h2>Table of contents</h2><ol><li><a href="#foreword">Foreword</a></li><li><a href="#normativeReferences">Normative references</a></li><li><a href="#designGoals">Design goals</a></li><li><a href="#notation-section">Notation</a></li><li><a href="#folding-unfolding-transformation">Folding and unfolding transformations</a><ol><li><a href="#unfold">unfold</a></li><li><a href="#fold">fold</a></li><li><a href="#inline">inline</a></li><li><a href="#extract">extract</a></li><li><a href="#abridge">abridge</a></li><li><a href="#detour">detour</a></li><li><a href="#unchain">unchain</a></li><li><a href="#chain">chain</a></li></ol></li><li><a href="#refactoring-transformation">Other refactoring transformations</a><ol><li><a href="#massage">massage</a></li><li><a href="#distribute">distribute</a></li><li><a href="#factor">factor</a></li><li><a href="#deyaccify">deyaccify</a></li><li><a href="#yaccify">yaccify</a></li><li><a href="#eliminate">eliminate</a></li><li><a href="#introduce">introduce</a></li><li><a href="#import">import</a></li><li><a href="#vertical">vertical</a></li><li><a href="#horizontal">horizontal</a></li><li><a href="#rassoc">rassoc</a></li><li><a href="#lassoc">lassoc</a></li><li><a href="#equate">equate</a></li></ol></li><li><a href="#increasing-transformation">Grammar lengthening transformations</a><ol><li><a href="#add">add</a></li><li><a href="#appear">appear</a></li><li><a href="#widen">widen</a></li><li><a href="#upgrade">upgrade</a></li><li><a href="#unite">unite</a></li></ol></li><li><a href="#decreasing-transformation">Grammar shortening transformations</a><ol><li><a href="#remove">remove</a></li><li><a href="#disappear">disappear</a></li><li><a href="#narrow">narrow</a></li><li><a href="#downgrade">downgrade</a></li></ol></li><li><a href="#concrete-revising-transformation">Refactorings in term-oriented semantics</a><ol><li><a href="#abstractize">abstractize</a></li><li><a href="#concretize">concretize</a></li><li><a href="#permute">permute</a></li></ol></li><li><a href="#abstract-revising-transformation">Semantics revising transformations</a><ol><li><a href="#define">define</a></li><li><a href="#undefine">undefine</a></li><li><a href="#redefine">redefine</a></li><li><a href="#inject">inject</a></li><li><a href="#project">project</a></li><li><a href="#replace">replace</a></li></ol></li><li><a href="#decorative-transformation">Decorative transformations</a><ol><li><a href="#designate">designate</a></li><li><a href="#unlabel">unlabel</a></li><li><a href="#deanonymize">deanonymize</a></li><li><a href="#anonymize">anonymize</a></li></ol></li><li><a href="#dump">dump</a></li><li><a href="#rename">rename</a><ol><li><a href="#renameL">renameL</a></li><li><a href="#renameN">renameN</a></li><li><a href="#renameS">renameS</a></li><li><a href="#rename-terminal">renameT</a></li></ol></li><li><a href="#reroot">reroot</a></li><li><a href="#compatibility-section">Compatibility</a></li></ol><h2><a name="designGoals"></a>Design goals</h2>
XBGF operator suite was developed mainly for grammar convergence
activities.

0 comments on commit 45a2636

Please sign in to comment.