ֲͲ ò ² Ͳֲ

[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ]
[ 16 ] [ 17 ] [ 18 ] [ 19 ] [ 20 ] [ 21 ] [ 22 ] [ 23 ] [ 24 ] [ 25 ] [ 26 ] [ 27 ] [ 28 ] [ 29 ] [ 30 ] [ 31 ] [ 32 ]
[ 33 ] [ 34 ] [ 35 ] [ 36 ] [ 37 ] [ 38 ] [ 39 ] [ 40 ] [ 41 ] [ 42 ] [ 43 ] [ 44 ] [ 45 ] [ 46 ] [ 47 ] [ 48 ] [ 49 ] [ 50 ]

 

2.7
REISSW.XSL ˲ Ͳ


<?xml version=1.0 encoding=Windows-1251?>

<!DOCTYPE xsl:stylesheet>

<xsl:stylesheet version=1.0

xmlns:xsl=HTPP://.w3.org/1999/XSL/Transform>

<xsl:output method=html indent=yes encoding=Windows-1251/>

 

<xsl:template match=/>

<xsl:apply-templates/>

</xsl:template>

<xsl:template match=spisok>

<wml>

<card id=card1 title= :>

<p>

<xsl:apply-templates select=reis/>

</p>

</card>

. 2.7


</wml>

</xsl:template>

 

<xsl:template match=reis>

<b><xsl:value-of select=id/></b><br/>

<xsl:value-of select=apany/><br/>

<xsl:value-of select=timefrom/><br/>

<xsl:value-of select=timeto/><br/>

<xsl:value-of select=price/><br/>

</xsl:template>

</xsl:stylesheet>

2.8
TRANSFORM.PHP ˲
XML-


<?php

 

function DeviceType() {

$browser_array = array(Noki, Eric, UP.B);

$browser = substr( trim ($HTTP_USER_AGENT), 0, 4);

 

if (in_array($browser, $browser_array)):

$xsltFile = reissw.xsl;

else:

$xsltFile = reiss.xsl;

endif;

return $xsltFile;

} // DeviceType()

 

// XML XSL ?

$xmlFile = reiss.xml;

$xslFile = DeviceType();

 

//

$th = @xslt_create() or die(Cant create XSLT handle!);

// ³ XML XSL

$xh = fopen($xmlFile, r) or die(Cant open XML file);

$sh = fopen($xslFile, r) or die(Cant open XSL file);

 

// XML XSL

$xmlContent = fread($xh, filesize($xmlFile));

$xslContent = fread($sh, filesize($xslFile));

 

// XSL-

$arguments = array(

/_xml => $xmlContent,

. 2.8


/_xsl => $xslContent

);

$result = @xslt_process($th, arg:/_xml, arg:/_xsl, NULL, $arguments);

 

// WAP-,

if ($xslFile == reissw):

header(content-type: text/vnd.wap.wml);

endif;

 

// XML-

if ($result)

echo ($result);

else {

print (There was an error that occurred in the XSL transformation...\n);

print (\tError number: . xslt_errno($th). \n);

print (\tError string: . xslt_error($th). \n);

exit; }

 

//

@xslt_free($th);

?>

 


. 2.9. reiss.xml
PHP

    • HTML?
    • JavaScript?
    • PHP?
    • Java?
    • DTD ?
    • DTD ?
    • XML HTML?
    • XML?
    • ?
    • SL ?
    • XML- ?
    • SL Internet Explorer?

[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ]
[ 16 ] [ 17 ] [ 18 ] [ 19 ] [ 20 ] [ 21 ] [ 22 ] [ 23 ] [ 24 ] [ 25 ] [ 26 ] [ 27 ] [ 28 ] [ 29 ] [ 30 ] [ 31 ] [ 32 ]
[ 33 ] [ 34 ] [ 35 ] [ 36 ] [ 37 ] [ 38 ] [ 39 ] [ 40 ] [ 41 ] [ 42 ] [ 43 ] [ 44 ] [ 45 ] [ 46 ] [ 47 ] [ 48 ] [ 49 ] [ 50 ]


! , . . . / , .
© 2007-2019 BPK Group.