Skip to content

Commit

Permalink
#201 Update documentation ''
Browse files Browse the repository at this point in the history
  • Loading branch information
enridaga committed Feb 23, 2024
1 parent 86fb281 commit 3927f20
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 34 deletions.
41 changes: 26 additions & 15 deletions docs/formats/HTML.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,10 @@ https://sparql-anything.cc/examples/simple.html
###### Query

```
PREFIX whatwg: <https://html.spec.whatwg.org/#>
SELECT ?text
CONSTRUCT
{
?s ?p ?o .
}
WHERE
{ SERVICE <x-sparql-anything:location=https://sparql-anything.cc/examples/simple.xml,html.parser=xml>
{ ?s ?p ?o }
Expand All @@ -371,18 +372,28 @@ WHERE
###### Result

```turtle
--------
| text |
========
| |
| |
| |
| |
| |
| |
| |
| |
--------
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix eg: <http://www.example.org/> .
@prefix fx: <http://sparql.xyz/facade-x/ns/> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rss: <http://purl.org/rss/1.0/> .
@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
@prefix whatwg: <https://html.spec.whatwg.org/#> .
@prefix xhtml: <http://www.w3.org/1999/xhtml#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix xyz: <http://sparql.xyz/facade-x/data/> .
[ rdf:type <http://www.example.org#Element> , fx:root ;
rdf:_1 [ rdf:type <http://www.example.org#someThing> ;
rdf:_1 "Hallo world"
] ;
rdf:_2 [ rdf:type <http://www.example.org#someThingElse> ;
<http://www.example.org#key> "0.1"
]
] .
```

Expand Down
2 changes: 1 addition & 1 deletion docs/formats/Metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ WHERE
<http://sparql.xyz/facade-x/data/F-Number>
"f/7.1" ;
<http://sparql.xyz/facade-x/data/File%20Modified%20Date>
"Fri Feb 23 15:43:37 +00:00 2024" ;
"Fri Feb 23 15:47:25 +00:00 2024" ;
<http://sparql.xyz/facade-x/data/File%20Name>
"Canon_40D.jpg" ;
<http://sparql.xyz/facade-x/data/File%20Size>
Expand Down
41 changes: 26 additions & 15 deletions formats/HTML.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,10 @@ https://sparql-anything.cc/examples/simple.html
###### Query

```
PREFIX whatwg: <https://html.spec.whatwg.org/#>
SELECT ?text
CONSTRUCT
{
?s ?p ?o .
}
WHERE
{ SERVICE <x-sparql-anything:location=https://sparql-anything.cc/examples/simple.xml,html.parser=xml>
{ ?s ?p ?o }
Expand All @@ -371,18 +372,28 @@ WHERE
###### Result

```turtle
--------
| text |
========
| |
| |
| |
| |
| |
| |
| |
| |
--------
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix eg: <http://www.example.org/> .
@prefix fx: <http://sparql.xyz/facade-x/ns/> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rss: <http://purl.org/rss/1.0/> .
@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
@prefix whatwg: <https://html.spec.whatwg.org/#> .
@prefix xhtml: <http://www.w3.org/1999/xhtml#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix xyz: <http://sparql.xyz/facade-x/data/> .
[ rdf:type <http://www.example.org#Element> , fx:root ;
rdf:_1 [ rdf:type <http://www.example.org#someThing> ;
rdf:_1 "Hallo world"
] ;
rdf:_2 [ rdf:type <http://www.example.org#someThingElse> ;
<http://www.example.org#key> "0.1"
]
] .
```

Expand Down
2 changes: 1 addition & 1 deletion formats/Metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ WHERE
<http://sparql.xyz/facade-x/data/F-Number>
"f/7.1" ;
<http://sparql.xyz/facade-x/data/File%20Modified%20Date>
"Fri Feb 23 15:43:37 +00:00 2024" ;
"Fri Feb 23 15:47:25 +00:00 2024" ;
<http://sparql.xyz/facade-x/data/File%20Name>
"Canon_40D.jpg" ;
<http://sparql.xyz/facade-x/data/File%20Size>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public class HTMLTriplifier implements Triplifier {
@Option(description = "It tells the triplifier to use the specified browser to navigate to the page to obtain HTML. By default a browser is not used. The use of a browser has some dependencies -- see [BROWSER](https://github.com/SPARQL-Anything/sparql.anything/blob/v1.0-DEV/BROWSER.md) and [justin2004's blogpost](https://github.com/justin2004/weblog/tree/master/scraping_with_sparql).", validValues = "chromium|webkit|firefox")
public static final IRIArgument PROPERTY_BROWSER = new IRIArgument("html.browser");


@Example(resource = "https://sparql-anything.cc/examples/simple.html", description = "The element names are case-sensitive when using the XML parser.", query = "CONSTRUCT {?s ?p ?o} WHERE { SERVICE <x-sparql-anything:location=https://sparql-anything.cc/examples/simple.xml,html.parser=xml> { ?s ?p ?o } }")
@Option(description = "It tells the triplifier to use the specified JSoup parser (default: html).", validValues = "xml html")
public static final IRIArgument PROPERTY_PARSER = new IRIArgument("html.parser");
public static final IRIArgument PROPERTY_PARSER = new IRIArgument("html.parser", "html");
private enum ParamParser {
HTML("html"), XML("xml");
private String str;
Expand Down

0 comments on commit 3927f20

Please sign in to comment.