Added itemref support and test
The test also tests "src based tags" as can be seen in dataset name
This commit is contained in:
		
							
								
								
									
										20
									
								
								tests/data/Itemref/result.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								tests/data/Itemref/result.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
{
 | 
			
		||||
  "items": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": [ "http://n.whatwg.org/work" ],
 | 
			
		||||
      "properties": {
 | 
			
		||||
        "work": [ "http://blog.example.com/gallery/images/house.jpeg" ],
 | 
			
		||||
        "title": [ "The house I found." ],
 | 
			
		||||
        "license": [ "http://www.opensource.org/licenses/mit-license.php" ]
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "type": [ "http://n.whatwg.org/work" ],
 | 
			
		||||
      "properties": {
 | 
			
		||||
        "work": [ "http://blog.example.com/gallery/images/mailbox.jpeg" ],
 | 
			
		||||
        "title": [ "The mailbox." ],
 | 
			
		||||
        "license": [ "http://www.opensource.org/licenses/mit-license.php" ]
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								tests/data/Itemref/source.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								tests/data/Itemref/source.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
<!-- URI: http://blog.example.com/gallery/ -->
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
    <title>Photo gallery</title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <h1>My photos</h1>
 | 
			
		||||
    <figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses">
 | 
			
		||||
        <img itemprop="work" src="images/house.jpeg" alt="A white house, boarded up, sits in a forest.">
 | 
			
		||||
        <figcaption itemprop="title">The house I found.</figcaption>
 | 
			
		||||
    </figure>
 | 
			
		||||
    <figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses">
 | 
			
		||||
        <img itemprop="work" src="images/mailbox.jpeg" alt="Outside the house is a mailbox. It has a leaflet inside.">
 | 
			
		||||
        <figcaption itemprop="title">The mailbox.</figcaption>
 | 
			
		||||
    </figure>
 | 
			
		||||
    <footer>
 | 
			
		||||
        <p id="licenses">All images licensed under the
 | 
			
		||||
            <a itemprop="license" href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.
 | 
			
		||||
        </p>
 | 
			
		||||
    </footer>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user