Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Sockets[ParseURL] - URL を成分に分解する
使い方
ParseURL(url)
パラメータ
url - 文字列; 分解される URL
説明
手続き ParseURL は、URL をその成分ごとに分解するために使用されます。引数 url は、分解される URL を表す Maple の文字列です。
URL の分解に成功すると、URL を記述するレコードが返されます。
URL を記述するのに使用されるレコードは、以下のスロットを持ちます:
scheme hostname port path user passwd
全ての成分が、サポートされている URL スキーム全てに対して意味があるわけではありません。特に、リソースパスは、URL スキームによる解釈を行うためのものです。リソースパスに関するスキーム固有の解釈は、この手続きでは現在提供されていません。
ある成分が、意味を持たない、または存在しない状態のいずれかで、さらにデフォルト値を持っていない場合には、対応するスロットは値 NULL を持ちます。空の文字列は、URL 内で全く空である、空(長さゼロ)のスロット値として認識します(例えば、telnet://joe:@host.com/path/ と telnet://joe:@host.com/path/ の違い)。
URL の分解機能は、 Internet RFC 1738 (ftp://ftp.isi.edu/in-notes/rfc1738.txt) で与えられる URL の指定方法に基づいています。その指定方法で登録される URL スキームの全てが、サポートされています。登録されていない URL スキームは、以下の一般的な構文を持ちます:
<scheme>://<username>:<password>@<hostname>:<port>/<resource-path>
例
with( Sockets ): url := ParseURL( "http://www.maplesoft.com/applications/" );
url:-scheme, url:-hostname, url:-port, url:-path;
url := ParseURL( "ftp://user:passwd@host.com:2002/path/to/file.txt" ): url:-scheme, url:-hostname, url:-port, url:-path, url:-user, url:-passwd;
url := ParseURL( "telnet://www.maplesoft.com:80" ): url:-scheme, url:-hostname, url:-port, url:-path;
url := ParseURL( "unknownScheme://user:passwd@host.com:2002/some/resource?with=search" ): url:-scheme, url:-hostname, url:-port, url:-path, url:-user, url:-passwd;
参照
Sockets パッケージの紹介
参考文献
RFC 1738 Uniform Resource Locators (URL) at ftp://ftp.isi.edu/in-notes/rfc1738.txt
Download Help Document