<input type="password" name="password" id="password" value="<?php echo $password; ?> " size="40" /> </details> <label for="endpoint" id="label_for_endpoint">Endpoint: </label> <input type="text" name="endpoint" id="endpoint" value="<?php echo $endpoint; ?> " size="80" /> <details><summary>predefined namespaces</summary> <pre><code> <?php foreach (EasyRdf_Namespace::namespaces() as $prefix => $uri) { print "\tPREFIX {$prefix}: <" . htmlspecialchars($uri) . "><br />\n"; } ?> </code></pre> </details> <label for="query" id="label_for_query">Query: </label> <textarea name="query" id="query" cols="80" rows="10"><?php echo $query; ?> </textarea> <input type="reset" value="Reset" /><input type="submit" value="Submit" /> </form> <?php $form = ob_get_contents(); ob_end_clean(); echo Standard::htmlSerializer($form, Standard::$htmlMetadata, $title = 'SPARQL query Form', "<h1>{$title}</h1>", '', true);
public function testHtmlSerializer() { $array1 = array('1', 2, 'abc', 'de' => 'ef'); $tmp = Representation::htmlSerializer($array1, Representation::$htmlMetadata); $this->assertStringStartsWith('<', $tmp); }