Foros del Web » Programando para Internet » ASP Clásico »

Menu xml

Estas en el tema de Menu xml en el foro de ASP Clásico en Foros del Web. Buenas asperos. Encontre en la web un sitio muy interesante de javascript y xml entre otras cosas. Hay en esta direccion para descargar un pequeño ...
  #1 (permalink)  
Antiguo 30/06/2006, 12:48
 
Fecha de Ingreso: noviembre-2003
Ubicación: Paraguay
Mensajes: 382
Antigüedad: 20 años, 6 meses
Puntos: 4
Mensaje Menu xml

Buenas asperos.

Encontre en la web un sitio muy interesante de javascript y xml entre otras cosas.

Hay en esta direccion para descargar un pequeño ejemplo para usar un programita que por medio de un xml forma un menu muy interesante.

Lo estuve mirando y tiene una parte en ASP. Yo aunque estudie asp en algun momento por no usarlo tanto no estoy pudiendo entender que es lo que hace especificamente. Mi idea es ver si se puede pasar a php que si lo uso mucho más.

Me pueden dar una mano para comprenderlo por favor?
  #2 (permalink)  
Antiguo 30/06/2006, 18:32
Avatar de El_Metallick  
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 7 meses
Puntos: 16
pues si posteas el codigo mucho mejor... pues no lo encuentro... saludos
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!
  #3 (permalink)  
Antiguo 03/07/2006, 08:22
 
Fecha de Ingreso: noviembre-2003
Ubicación: Paraguay
Mensajes: 382
Antigüedad: 20 años, 6 meses
Puntos: 4
En la parte inferior izquierda de la pantalla dice download pero esta sería la direccion directa

Un abrazo
  #4 (permalink)  
Antiguo 16/08/2006, 15:37
 
Fecha de Ingreso: noviembre-2003
Ubicación: Paraguay
Mensajes: 382
Antigüedad: 20 años, 6 meses
Puntos: 4
Posteo el código para los que no consiguen bajarlo

<%
' DATE: 8/00
' AUTHOR: Chris Faranetta
' DESC: This will do an XML\XSL transformation against two XML Document files. The sources passed in can
' be either an XML Document string, an MSXML(2).DOMDocument or node, or a filename.
' I'm assuming that if a filename is passed in, it will have a three letter extension.
' NOTE: The XSLSrc could be a cached XSL Template from an ASP Application Session.
' NOTE: All documents are loaded as Free Threaded - this does effect performance if you are not caching your style sheets.
' PARAMS: vXMLSrc - either the XML Document filename or a text string containing the XML Document or an Object.
' vXSLSrc - either the XSL Document filename or a text string containing the XSL Document or an Object.
' vParamList - an array of name\value pairs to be passed into the XSL Template.
' EX: array( array( param_name1, param_val1 ), array( param_name2, param_val2 ), ... )
' RETURNS: some kind of text (HTML, WML, HDML, XHTML, ... )!!!
function tformEx( vXMLSrc, vXSLSrc, vParamList )
dim oXML
dim oXSL

' Load the documents we need for a transformation.
set oXML = LoadDocument( vXMLSrc ) ' load the XML Document
if ( oXML.parseError <> 0 ) then
tformEx = "tFormEx(): Load of the XML Document failed in tformEx(), reason: " & oXML.parseError.reason & "<br></br>"
set oXML = nothing
exit function
end if

set oXSL = LoadDocument( vXSLSrc ) ' load the XSLT Document.
if ( oXSL.parseError <> 0 ) then
tformEx = "tFormEx(): Load of the XSL Document failed in tformEx(), reason: " & oXSL.parseError.reason & " " & oXSL.parseError.line & "<br></br>"
set oXML = nothing
set oXSL = nothing
exit function
end if

' prep for the transformation.
dim oProc
dim oParam
dim oTemplate

set oTemplate = server.createobject( "MSXML2.XSLTemplate")
oTemplate.stylesheet = oXSL
set oProc = oTemplate.createProcessor()
oProc.input = oXML

' do params
on error resume next

if ( not isNull(vParamList) ) then
for each oParam in vParamList
oProc.addParameter oParam(0), oParam(1) ' name, value
next
end if

if ( err.number <> 0 ) then
tformEx = "tformEx(): Invalid parameter; " & err.description & ", " & err.number
set oXML = nothing
set oXSL = nothing
set oProc = nothing
exit function
end if

' do the transformation
oProc.transform
tformEx = oProc.output

set oXML = nothing
set oXSL = nothing
set oProc = nothing
end function


' DATE: 8/00
' AUTHOR: Chris Faranetta
' DESC: This will do an XML\XSL transformation against two XML Document files. The sources passed in can
' be either an XML Document string, an MSXML(2).DOMDocument or node, or a filename.
' I'm assuming that if a filename is passed in, it will have a three letter extension.
' NOTE: The XSLSrc could be a cached XSL Template from an ASP Application Session.
' PARAMS: vXMLSrc - either the XML Document filename or a text string containing the XML Document or an Object.
' vXSLSrc - either the XSL Document filename or a text string containing the XSL Document or an Object.
' RETURNS: some kind of text (HTML, WML, HDML, XHTML, ... )!!!
function tform( vXMLSrc, vXSLSrc )
tform = tformEx( vXMLSrc, vXSLSrc, null )
end function


' DATE: 8/00
' AUTHOR: Chris Faranetta
' DESC: Does an intelligent load of an XML Document.
' PARAMS: vXMLSrc - A file name, XML Document text string or an XML DOM object.
' RETURNS: an XML DOM Object
function LoadDocument( vXMLSrc )
dim oXML

if ( typename( vXMLSrc ) = "Object" Or typename( vXMLSrc ) = "DOMDocument") then
set oXML = vXMLSrc ' This is easy, already an object!
else ' either load a filename or an XML Document string.
set oXML = server.CreateObject( "MSXML2.FreeThreadedDOMDocument" )
oXML.async = false

' clean this up in case it is a filename.
vXMLSrc = rtrim( cstr(vXMLSrc) )

' If we assume there is an extension of .xyz at the end (where xyz is some 3 letter extension), then it must be a filename.
if ( mid( vXMLSrc, len( vXMLSrc ) - 3, 1 ) = "." ) then ' this is a filename
oXML.load server.mappath( vXMLSrc )
else
oXML.loadXML vXMLSrc ' this is a text string
end if
end if

set LoadDocument = oXML
end function
%>
  #5 (permalink)  
Antiguo 16/08/2006, 21:01
Avatar de Myakire
Colaborador
 
Fecha de Ingreso: enero-2002
Ubicación: Centro de la república
Mensajes: 8.849
Antigüedad: 22 años, 4 meses
Puntos: 146
mmm, pues solo pudiera recomendarte que fueras investigando cada parte del código que no entiendas y buscas referencias para encontrar su invocación equivalente, por ejemplo del MSXML2.FreeThreadedDOMDocument


Saludos
  #6 (permalink)  
Antiguo 18/09/2006, 07:39
 
Fecha de Ingreso: noviembre-2003
Ubicación: Paraguay
Mensajes: 382
Antigüedad: 20 años, 6 meses
Puntos: 4
Y bueno. voy a ver que puedo hacer porque la verdad que no se nada de asp.

Pero gracias de todas maneras
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:12.