-
Fototrend

Új hozzászólás Aktív témák
-
Jester01
veterán
válasz
zserrbo
#6772
üzenetére
A lebegőpontos számok már csak ilyenek, főleg kettes számrendszerben.
Éppen ezért kell összehasonlításnál mindig valami toleranciát használni, kiírásnál meg értelmes kerekítést. Ja és fontos számításoknál tudni, hogy hol mennyi hiba gyűlik össze vagy kerülni a lebegőpontos számokat.
-
Sk8erPeter
nagyúr
válasz
zserrbo
#6650
üzenetére
"Úgy látom linux alá van csak"
Bullshit.
konkrétabban:
http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows/4921215#4921215 -
Jester01
veterán
válasz
zserrbo
#6654
üzenetére
Az xmlns miatt nem megy. Ugye ha namespace-be teszed az elemeket akkor már nem az a neve, hogy "body" ...
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="xhtml:body" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<!-- first div -->
<xsl:variable name="root" select="xhtml:div" />
<xsl:element name="entity">
<xsl:attribute name="id">
<xsl:value-of select="$root/@id" />
</xsl:attribute>
<xsl:attribute name="type">
<xsl:value-of select="substring-before(substring($root/@class, 3), ' ')" />
</xsl:attribute>
<xsl:attribute name="top">
<xsl:value-of select="substring-before(substring-after($root/@style, 'top:'), 'px;')" />
</xsl:attribute>
<xsl:attribute name="left">
<xsl:value-of select="substring-before(substring-after($root/@style, 'left:'), 'px;')" />
</xsl:attribute>
<xsl:value-of select="normalize-space(string($root))" />
<xsl:for-each select="$root/following-sibling::xhtml:div">
<xsl:element name="property">
<xsl:attribute name="id">
<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:attribute name="type">kulcs</xsl:attribute>
<xsl:attribute name="top">
<xsl:value-of select="substring-before(substring-after(@style, 'top:'), 'px;')" />
</xsl:attribute>
<xsl:attribute name="left">
<xsl:value-of select="substring-before(substring-after(@style, 'left:'), 'px;')" />
</xsl:attribute>
<xsl:value-of select="normalize-space(string(.))" />
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet> -
Jester01
veterán
válasz
zserrbo
#6650
üzenetére
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/body">
<!-- first div -->
<xsl:variable name="root" select="div" />
<xsl:element name="entity">
<xsl:attribute name="id">
<xsl:value-of select="$root/@id" />
</xsl:attribute>
<xsl:attribute name="type">
<xsl:value-of select="substring-before(substring($root/@class, 3), ' ')" />
</xsl:attribute>
<xsl:attribute name="top">
<xsl:value-of select="substring-before(substring-after($root/@style, 'top:'), 'px;')" />
</xsl:attribute>
<xsl:attribute name="left">
<xsl:value-of select="substring-before(substring-after($root/@style, 'left:'), 'px;')" />
</xsl:attribute>
<xsl:value-of select="normalize-space(string($root))" />
<xsl:for-each select="$root/following-sibling::div">
<xsl:element name="property">
<xsl:attribute name="id">
<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:attribute name="type">kulcs</xsl:attribute>
<xsl:attribute name="top">
<xsl:value-of select="substring-before(substring-after(@style, 'top:'), 'px;')" />
</xsl:attribute>
<xsl:attribute name="left">
<xsl:value-of select="substring-before(substring-after(@style, 'left:'), 'px;')" />
</xsl:attribute>
<xsl:value-of select="normalize-space(string(.))" />
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
</xsl:stylesheet> -
zserrbo
aktív tag
válasz
zserrbo
#6648
üzenetére
A példa amúgy nem teljes, mert tartalmazna svg-t is, aztán nem szabványos attribútumokat egyes div elemeknél, ami miatt nem lenne valid xhtml.
Karma: Köszi megnézem tudom-e használni.
update1: Úgy látom linux alá van csak, nemtom még mivel járnék jobban, lehet mindkettővel próbálkozom. Először maradnék az XSLT-nél.
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Hp ProDesk/ EliteDesk SFF/MT G4/ G5/ G6 / i5 8-9-10.gen /Win11- Számla, garancia
- Dell Latitude 7340 2-in-1 i5 13.gen, 16GB DDR5, 512GB SSD, QHD+ érintőkijelző, ÚJ ÁLLAPOT!
- ÁRGARANCIA!Épített KomPhone i5 14600KF 32/64GB DDR5 RAM RTX 5070Ti 16GB GAMER PC termékbeszámítással
- MSI Thin GF63 - 15.6"FHD IPS 144Hz - i5-12450H - 8GB - 512GB - RTX 3050 4GB - Win11 - Gari - MAGYAR
- AKCIÓ! Acer Nitro 5 AN515-58-75F8 Gamer notebook - i7 12700H 16GB DDR4 512GB SSD RTX 3060 6GB
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest



