SetPublicID
Description
Sets the public ID of an externally referenced DTD.
Syntax
|
1 |
pbdom_doctype_name.SetPublicID(string strPublicID) |
|
Argument |
Description |
|---|---|
|
pbdom_doctype_name |
The name of a PBDOM_DOCTYPE object |
|
strPublicID |
A string that specifies the new public |
Return value
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 2 3 4 5 6 |
PBDOM_DOCUMENT pbdom_doc pbdom_doc.GetDocType().SetPublicID & ("-//MyCompany//DTD//EN") MessageBox ("Get Public ID", & 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