- From: Hugo Haas <hugo@dev.w3.org>
- Date: Tue, 27 Jul 2004 20:18:29 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/tools
In directory homer:/tmp/cvs-serv4622
Modified Files:
setup-namespaces
Log Message:
Almost there; just need getTitle() to work
Index: setup-namespaces
===================================================================
RCS file: /sources/public/2002/ws/desc/tools/setup-namespaces,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** setup-namespaces 26 Jul 2004 18:45:06 -0000 1.1
--- setup-namespaces 27 Jul 2004 20:18:27 -0000 1.2
***************
*** 4,7 ****
--- 4,8 ----
use strict;
+ use XML::DOM;
use File::Copy;
***************
*** 15,18 ****
--- 16,20 ----
my ($PUBDIR, $DOC, $Y, $M, $D) = @ARGV;
my $TARGET = "$WWW/$Y/$M/wsdl";
+ my $TRLOC = "$Y/$DOC";
if (! -d $WWW) {
***************
*** 49,52 ****
--- 51,79 ----
}
+ sub getTitle() {
+ # Not worky yet
+ my $wsdl20 = 'wsdl20.xml';
+ my $parser = new XML::DOM::Parser;
+ my $doc = $parser->parsefile($wsdl20);
+ my $e;
+ if ($ID eq 'PART1') {
+ $e = 'part1.title';
+ }
+ elsif ($ID eq 'PART2') {
+ $e = 'part2.title';
+ }
+ elsif ($ID eq 'PART3') {
+ $e = 'part3.title';
+ }
+ use Data::Dumper;
+ $doc->getEntity('entities');
+ return $doc->getEntity($e);
+ }
+
+ print &getTitle()."\n";
+ exit;
+ # @@@
+
+
my $htaccessTemplate = "# .htaccess created by setup-namespaces; edit carefully
RewriteEngine On
***************
*** 68,72 ****
my $c;
if (-f $htaccess) {
! open($f, "$htaccess");
$c = join('', <$f>);
} else {
--- 95,99 ----
my $c;
if (-f $htaccess) {
! open($f, "$htaccess") || die "$!";
$c = join('', <$f>);
} else {
***************
*** 104,107 ****
--- 131,136 ----
sub moveSchema() {
+ # @@@
+ return;
my $src = "$PUBDIR/$_[0]";
my $dst = "$TARGET/$_[0]";
***************
*** 111,116 ****
--- 140,147 ----
if ($ID eq 'PART1') {
&moveSchema("wsdl20.xsd", "wsdl20.xsd");
+ &moveSchema("wsdl-instance.xsd", "../wsdl-instance.xsd");
}
elsif ($ID eq 'PART2') {
+ &moveSchema("wsdl20-rpc.xsd", "rpc.xsd");
}
elsif ($ID eq 'PART3') {
***************
*** 121,123 ****
###########################################################################
! # @@@ HTML placeholders: patterns.html, style/rpc.html, etc.
--- 152,267 ----
###########################################################################
! my $signatureTemplate = <<'SIG_EOF'
!
! <hr />
! <p>
! Comments on this document have to be sent to the public <a
! href="mailto:www-ws-desc@w3.org">www-ws-desc@w3.org</a> mailing
! list (<a href=
! "http://lists.w3.org/Archives/Public/www-ws-desc/">public
! archive</a>).</p>
! </p>
! </body>
! </html>
! SIG_EOF
! ;
!
! ###########################################################################
!
! # patterns.html
!
! my $patternsTemplate = <<'PATTERNST_EOF'
! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
! <head>
! <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
! <title>Web Services Description Language (WSDL) Version 2.0 Patterns</title>
! <link type="text/css" rel="stylesheet" href=
! "http://www.w3.org/StyleSheets/TR/base.css" />
! </head>
! <body>
! <div class="head">
! <p><a href="http://www.w3.org/"><img width="72" height="48" alt=
! "W3C" src="http://www.w3.org/Icons/w3c_home" /></a></p>
! <h1>Web Services Description Language (WSDL) Version 2.0 Patterns</h1>
! </div>
!
! <p>
! The Web Services Description Language (WSDL) Version 2.0 message
! patterns are intended for use with the Web Services Description
! Language Version 2.0 (WSDL 2.0).
! </p>
! <p>
! For a complete definition of the patterns, refer to <a
! href='http://www.w3.org/TR/@TRLOC@/'>Web
! Services Description Language (WSDL) Version 2.0 Part 2</a>
! specification.
! </p>
! PATTERNST_EOF
! ;
!
! if ($ID eq 'PART2') {
! my $c = $patternsTemplate;
! $c =~ s|\@TRLOC\@|$TRLOC|g;
! $c .= $signatureTemplate;
! my $f;
! open($f, "> $TARGET/patterns.html") || die "$!";
! print $f $c;
! close($f);
! }
!
! ###########################################################################
!
! # Styles
!
! my $styleTemplate = <<'STYLET_EOF'
! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
! <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
! <head>
! <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
! <title>Web Services Description Language (WSDL) Version 2.0 @NAME@ Style</title>
! <link type="text/css" rel="stylesheet" href=
! "http://www.w3.org/StyleSheets/TR/base.css" />
! </head>
! <body>
! <div class="head">
! <p><a href="http://www.w3.org/"><img width="72" height="48" alt=
! "W3C" src="http://www.w3.org/Icons/w3c_home" /></a></p>
! <h1>Web Services Description Language (WSDL) Version 2.0 @NAME@ Style</h1>
! </div>
!
! <p>
! The Web Services Description Language (WSDL) Version 2.0 @NAME@
! Style is intended for use with the Web Services Description
! Language Version 2.0 (WSDL 2.0).
! </p>
! <p>
! For a complete definition of the @NAME@ Style, refer to <a
! href='http://www.w3.org/TR/@TRLOC@/'>Web Services
! Description Language (WSDL) Version 2.0 @@@</a>
! specification.
! </p>
! STYLET_EOF
! ;
!
! sub genStyleDoc() {
! my ($fn, $name) = @_;
! my $c = $styleTemplate;
! $c =~ s|\@NAME\@|$name|g;
! $c =~ s|\@TRLOC\@|$TRLOC|g;
! $c .= $signatureTemplate;
! my $f;
! open($f, "> $TARGET/style/$fn") || die "$!";
! print $f $c;
! close($f);
! }
!
! if ($ID eq 'PART2') {
! &genStyleDoc('rpc.html', 'RPC');
! }
! elsif ($ID eq 'PART3') {
! &genStyleDoc('uri.html', 'URI');
! &genStyleDoc('multipart.html', 'Multipart');
! }
Received on Tuesday, 27 July 2004 16:19:21 UTC