4D v14

SVG_ADD_NAMESPACE

Home

 
4D v14
SVG_ADD_NAMESPACE

SVG_ADD_NAMESPACE 


 

SVG_ADD_NAMESPACE ( svgObject ; prefix {; URI} ) 
Parameter Type   Description
svgObject  SVG_Ref in SVG object reference
prefix  Text in Prefix of namespace
URI  Text in URI of namespace

The SVG_ADD_NAMESPACE method adds an XML namespace attribute to the root of the DOM Tree for the SVG object designated by the svgObject parameter. You can use this method, more specifically, to add a namespace to an SVG code snippet.

In prefix, pass a string containing the prefix of the namespace attribute. You can use one of the following constants:

In this case, the URI parameter is unnecessary. 

You can also pass the prefix of a custom namespace in the prefix parameter and its URI in the corresponding parameter. In this case, the URI parameter is mandatory and if it is omitted, an error is generated.

Example  

The following code:

 SVG_ADD_NAMESPACE($svgRef;"svgNS")

... adds the following code to the root of the SVG object:

<xmlns="http://www.w3.org/2000/svg">

 
PROPERTIES 

Product: 4D
Theme: Attributes
Number: 65874

 
HISTORY 

Created: 4D v13

 
ARTICLE USAGE

4D SVG Component ( 4D v13)
4D SVG Component ( 4D v14)