Skip to content

Commit 1fd828e

Browse files
committed
updates to basic.sh for stderr and stdout
1 parent c27db42 commit 1fd828e

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

app/shell-cmd/basic.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# requires Saxon XSLT 2.0 processor from http://saxonica.com (replace SAXONJAR below)
77

8-
SAXONJAR="/Users/philipfearon/Applications/SaxonHE9-6-0-2J/saxon9he.jar"
9-
# entry point is XMLSpectrum's highlight-file xsl stylesheet:
8+
SAXONJAR=$SAXON_HOME_JAR
9+
# entry point is basic-wrap.xsl
1010
XMLSPECTRUM=$(dirname $0)/../xsl/basic-wrap.xsl
1111

1212
# this script resolves relative paths in the sourcepath based on the current directory
@@ -43,12 +43,14 @@ if [[ $# -eq 0 || $1 == '-?' ]]
4343
then
4444
newpath=$(dirname $relpath)/xms-out
4545
newfilepath=$newpath/$filename
46-
java -jar $SAXONJAR -xsl:$XMLSPECTRUM -s:$relpath -o:$newfilepath $2 $3 $4 $5 $6 $7 $8 $9
46+
java -jar $SAXONJAR -xsl:$XMLSPECTRUM -t -s:$relpath -o:$newfilepath $2 $3 $4 $5 $6 $7 $8 $9 &>javalog.log
47+
echo "---- Saxon log ---------"
48+
cat javalog.log
49+
echo "---- Saxon log ends ----"
50+
echo "output written to: $newfilepath"
4751
#cat $newfilepath
48-
xmlspec.sh $newfilepath force-newline=yes indent=2 color-theme=tomorrow-night
49-
echo ""
50-
echo "---------------------------"
51-
echo "output file is at: $newfilepath"
52+
xmlspec.sh $newfilepath force-newline=yes auto-trim=yes document-type=xslt indent=2 color-theme=tomorrow-night &>xmlspec.log
53+
cat xmlspec.log
5254
else
5355
echo "file not found: $relpath"
5456
fi

app/xsl/basic-wrap.xsl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@
44
exclude-result-prefixes="xsl xs f"
55
xmlns:f="internal">
66

7+
<xsl:output method="xml" omit-xml-declaration="yes"/>
8+
79
<xsl:variable name="globals" select="/*"/>
810
<xsl:variable name="xmlns" select="/*"/>
911
<xsl:variable name="ancestor-path" select="''"/>
1012

1113
<xsl:template match="/*">
12-
<result>
13-
<xsl:for-each-group select="*" group-starting-with=".[@class = ('es')]">
14-
<group current-key="{current-grouping-key()}">
15-
<xsl:for-each select="current-group()">
16-
<cg><xsl:sequence select="."/></cg>
17-
</xsl:for-each>
18-
</group>
19-
</xsl:for-each-group>
20-
</result>
14+
<xsl:copy-of select="."/>
2115
</xsl:template>
2216

2317
</xsl:stylesheet>

0 commit comments

Comments
 (0)