PBDOM_DOCTYPE:
SetPublicID method
Description
Sets the public ID of an externally referenced DTD.
Syntax
|
1 |
<span>pbdom_doctype_name</span>.SetPublicID(string <span></span><span>strPublicID</span>) |
|
Argument |
Description |
|---|---|
|
pbdom_doctype_name |
The name of a PBDOM_DOCTYPE |
|
strPublicID |
A string that specifies the new public |
Return Values
PBDOM_DOCTYPE.
Examples
Suppose you have the following DTD declaration:
|
1 |
<!DOCTYPE abc [<!ELEMENT abc (#PCDATA)> <!ELEMENT data (#PCDATA)> <!ELEMENT inner_data (#PCDATA)>]> |
The following PowerScript sets the public ID, and then gets
it and displays it in a message box:
|
1 |
PBDOM_DOCUMENT pbdom_doc<br> <br>pbdom_doc.GetDocType().SetPublicID &<br>   ("-//MyCompany//DTD//EN")<br>MessageBox ("Get Public ID", &<br>   pbdom_doc.GetDocType().GetPublicID()) |
The
returned string from the GetPublicID call is:
|
1 |
"-//MyCompany//DTD//EN" |
The final DOCTYPE definition in the document is:
|
1 |
<!DOCTYPE abc PUBLIC "-//MyCompany//DTD//EN" [<!ELEMENT abc (#PCDATA)> <!ELEMENT data (#PCDATA)> <!ELEMENT inner_data (#PCDATA)>]> |
About Public ID
The PUBLIC ID is usually accompanied by a SYSTEM ID, so the
DOCTYPE declaration in this example (with a PUBLIC ID but no SYSTEM
ID) might be considered invalid by some parsers.
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest