Permalink
Browse files

connected W3C⇒LDF with the existing W3C⇒BGF

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@826 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Sep 10, 2010
1 parent 42263d2 commit bc3af19a53e6495539035e12b13bd1c8525aa6d1
Showing with 312 additions and 364 deletions.
  1. +4 −1 shared/xsd/ldf.xsd
  2. +11 −16 topics/documents/xpath/Makefile
  3. +1 −1 topics/documents/xpath/xpath1.xml
  4. +296 −346 topics/extraction/w3c/spec2ldf.xslt
View
@@ -1,7 +1,9 @@
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ldf="http://planet-sl.org/ldf" xmlns:bgf="http://planet-sl.org/bgf" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://planet-sl.org/ldf">
<!--
<xsd:import namespace="http://planet-sl.org/bgf" schemaLocation="bgf.xsd"/>
<xsd:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="fakemathml.xsd"/>
-->
<!-- info -->
<xsd:annotation>
<xsd:documentation>
@@ -696,7 +698,6 @@
<xsd:attribute name="id" type="xsd:ID"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="code" type="xsd:string"/>
<xsd:complexType name="textual-content">
<xsd:sequence>
<xsd:group ref="ldf:text-element" maxOccurs="unbounded"/>
@@ -737,7 +738,9 @@
<xsd:attribute name="source" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<!-- UNCOMMENT HERE
<xsd:element ref="bgf:production"/>
-->
<!-- later redo with MathML -->
<!--<xsd:element ref="mml:math" />-->
</xsd:choice>
@@ -1,22 +1,17 @@
bgf:
/usr/local/bin/xsltproc spec2bgf.xslt xpath-pp.xml > xpath1.bgf
perl -pi -w -e 's/<unknown>\)\*<\/unknown>/<unknown>\)<\/unknown><postfix-star\/>/g;' xpath1.bgf
perl -pi -w -e 's/<unknown>\)\?<\/unknown>/<unknown>\)<\/unknown><postfix-optional\/>/g;' xpath1.bgf
perl -pi -w -e 's/<unknown>\(<\/unknown>/<sequence><bgf:expression>/g;' xpath1.bgf
perl -pi -w -e 's/<unknown>\)<\/unknown>/<\/bgf:expression><\/sequence>/g;' xpath1.bgf
/usr/local/bin/xsltproc postfix2confix.xslt xpath1.bgf > xpath1a.bgf
/usr/local/bin/xsltproc ununknow.xslt xpath1a.bgf > xpath1b.bgf
build:
/usr/local/bin/xsltproc spec2ldf.xslt xpath-pp.xml > xpath1.ldf
../../../shared/tools/spec2bgf xpath1.xml xpath1.bgf
../../../shared/tools/checkxml bgf xpath1.bgf
/usr/local/bin/xsltproc --stringparam grammar `pwd`'/xpath1.bgf' ../../extraction/w3c/spec2ldf.xslt xpath1.xml > xpath1.ldf
../../../shared/tools/checkxml ldf xpath1.ldf
get:
curl -k http://www.w3.org/TR/1999/REC-xpath-19991116.xml >xpath1.xml
curl -k http://www.w3.org/TR/2007/REC-xpath20-20070123/xpath20.xml >xpath2.xml
curl -k http://www.w3.org/XML/1998/06/xmlspec-v20.dtd > xmlspec-v20.dtd
test:
../../../shared/tools/checkxml ldf xpath1.ldf
get:
curl -k http://www.w3.org/TR/1999/REC-xpath-19991116.xml > xpath1.xml
curl -k http://www.w3.org/TR/2007/REC-xpath20-20070123/xpath20.xml > xpath2.xml
curl -k http://www.w3.org/XML/1998/06/xmlspec-v20.dtd > xmlspec-v20.dtd
perl -pi -w -e 's/\/XML\/1998\/06\/xmlspec-v20.dtd/xmlspec-v20.dtd/g;' xpath1.xml
clean:
*~
rm -f *~ *.bgf
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Id: REC-xpath-19991116.xml,v 1.1 1999/11/16 15:01:35 hugo Exp $ -->
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification V2.0//EN"
"/XML/1998/06/xmlspec-v20.dtd" [
"xmlspec-v20.dtd" [
<!ENTITY XML "http://www.w3.org/TR/REC-xml">
<!ENTITY XMLNames "http://www.w3.org/TR/REC-xml-names">
<!ENTITY year "1999">
Oops, something went wrong.

0 comments on commit bc3af19

Please sign in to comment.