| 245 |
|
|
| 246 |
<xsl:when test="descendant::*[@id=$contentid or @class=$contentid ]"> |
<xsl:when test="descendant::*[@id=$contentid or @class=$contentid ]"> |
| 247 |
<!-- user-defined id tag --> |
<!-- user-defined id tag --> |
| 248 |
<xsl:attribute name="precision" value="1"/> |
<xsl:attribute name="precision" >1</xsl:attribute> |
| 249 |
<xsl:attribute name="title" >Found the named content ID first time!</xsl:attribute> |
<xsl:attribute name="title" >Found the named content ID first time!</xsl:attribute> |
| 250 |
<xsl:for-each select="descendant::*[@id=$contentid or @class=$contentid]" > |
<xsl:for-each select="descendant::*[@id=$contentid or @class=$contentid]" > |
| 251 |
<xsl:apply-templates /> |
<xsl:apply-templates /> |
| 260 |
to avoid premature false positives. |
to avoid premature false positives. |
| 261 |
--> |
--> |
| 262 |
<xsl:when test="descendant::*[@id='bodyCopy' or @class='bodyCopy' or @id='contentbody' or @class='contentbody']"> |
<xsl:when test="descendant::*[@id='bodyCopy' or @class='bodyCopy' or @id='contentbody' or @class='contentbody']"> |
| 263 |
<xsl:attribute name="precision" value=".75"/> |
<xsl:attribute name="precision" >.75</xsl:attribute> |
| 264 |
<xsl:attribute name="title" >Found a generically named element that's probably the body copy.</xsl:attribute> |
<xsl:attribute name="title" >Found a generically named element that's probably the body copy.</xsl:attribute> |
| 265 |
<xsl:comment>Imported From the element called bodyCopy</xsl:comment> |
<xsl:comment>Imported From the element called bodyCopy</xsl:comment> |
| 266 |
<xsl:for-each select="descendant::*[@id='bodyCopy' or @class='bodyCopy' or @id='contentbody' or @class='contentbody']" > |
<xsl:for-each select="descendant::*[@id='bodyCopy' or @class='bodyCopy' or @id='contentbody' or @class='contentbody']" > |
| 269 |
</xsl:when> |
</xsl:when> |
| 270 |
|
|
| 271 |
<xsl:when test="//*[@id='maincontent']"> |
<xsl:when test="//*[@id='maincontent']"> |
| 272 |
<xsl:attribute name="precision" value=".66"/> |
<xsl:attribute name="precision" >.66</xsl:attribute> |
| 273 |
<xsl:attribute name="title" >Found an element named 'maincontent' that may be the body copy.</xsl:attribute> |
<xsl:attribute name="title" >Found an element named 'maincontent' that may be the body copy.</xsl:attribute> |
| 274 |
<xsl:comment>Imported From the element called maincontent</xsl:comment> |
<xsl:comment>Imported From the element called maincontent</xsl:comment> |
| 275 |
<xsl:for-each select="//*[@id='maincontent']" > |
<xsl:for-each select="//*[@id='maincontent']" > |
| 278 |
</xsl:when> |
</xsl:when> |
| 279 |
|
|
| 280 |
<xsl:when test="descendant::*[@id='main' or @class='main']"> |
<xsl:when test="descendant::*[@id='main' or @class='main']"> |
| 281 |
<xsl:attribute name="precision" value=".5"/> |
<xsl:attribute name="precision" >.5</xsl:attribute> |
| 282 |
<xsl:attribute name="title" >Found an element named 'main' that may be the body copy.</xsl:attribute> |
<xsl:attribute name="title" >Found an element named 'main' that may be the body copy.</xsl:attribute> |
| 283 |
<xsl:comment>Imported From the element called main</xsl:comment> |
<xsl:comment>Imported From the element called main</xsl:comment> |
| 284 |
<xsl:for-each select="descendant::*[@id='main' or @class='main']" > |
<xsl:for-each select="descendant::*[@id='main' or @class='main']" > |
| 294 |
'content' MAKE IT the meat! Not the outside of a wrapper div :-( |
'content' MAKE IT the meat! Not the outside of a wrapper div :-( |
| 295 |
However, I'll skip the class=content stuff, as that could be anything. |
However, I'll skip the class=content stuff, as that could be anything. |
| 296 |
--> |
--> |
| 297 |
<xsl:attribute name="precision" value=".33"/> |
<xsl:attribute name="precision" >.33</xsl:attribute> |
| 298 |
<xsl:attribute name="title" >Found an element named 'content' that may be the body copy. Could be anything though.</xsl:attribute> |
<xsl:attribute name="title" >Found an element named 'content' that may be the body copy. Could be anything though.</xsl:attribute> |
| 299 |
<xsl:comment>Imported From the element called content</xsl:comment> |
<xsl:comment>Imported From the element called content</xsl:comment> |
| 300 |
<xsl:for-each select="descendant::*[@id='content']" > |
<xsl:for-each select="descendant::*[@id='content']" > |
| 322 |
This is a domain-specific example that grabs content from php.net documentation |
This is a domain-specific example that grabs content from php.net documentation |
| 323 |
Just another example really |
Just another example really |
| 324 |
--> |
--> |
| 325 |
<xsl:attribute name="precision" value=".25"/> |
<xsl:attribute name="precision" >.25</xsl:attribute> |
| 326 |
<xsl:attribute name="title" >Found an element named 'reference' that may be the body copy. Just a guess really.</xsl:attribute> |
<xsl:attribute name="title" >Found an element named 'reference' that may be the body copy. Just a guess really.</xsl:attribute> |
| 327 |
<xsl:comment>Imported From the element called reference</xsl:comment> |
<xsl:comment>Imported From the element called reference</xsl:comment> |
| 328 |
<xsl:for-each select="descendant::*[@class='reference']" > |
<xsl:for-each select="descendant::*[@class='reference']" > |