라이브러리

[PHP] XSLTProcessor::removeParameter - 매개변수 제거




XSLTProcessor::removeParameter

XSLTProcessor::removeParameter 메소드는 XSLT 프로세서에서 파라미터를 제거하는 메소드입니다. 이 메소드는 XSLT 프로세서에 설정된 파라미터 중 하나를 제거할 수 있습니다.

사용법


XSLTProcessor::removeParameter 메소드는 다음과 같이 사용할 수 있습니다.

#hostingforum.kr
php

$xsltProcessor = new XSLTProcessor();

$xsltProcessor->importStylesheet($xsl);

$xsltProcessor->removeParameter('paramName');



예제


다음 예제에서는 XSLT 프로세서에 파라미터를 설정하고 제거하는 방법을 보여줍니다.

#hostingforum.kr
php

// XSLT 스타일 시트를 로드합니다.

$xsl = new DOMDocument();

$xsl->loadXML(file_get_contents('example.xsl'));



// XSLT 프로세서를 생성하고 스타일 시트를 로드합니다.

$xsltProcessor = new XSLTProcessor();

$xsltProcessor->importStylesheet($xsl);



// 파라미터를 설정합니다.

$xsltProcessor->setParameter('', 'paramName', 'paramValue');



// 파라미터를 제거합니다.

$xsltProcessor->removeParameter('paramName');



// 파라미터가 제거되었는지 확인합니다.

echo $xsltProcessor->getParameter('paramName') ? '파라미터가 남아 있습니다.' : '파라미터가 제거되었습니다.';



참고


* XSLTProcessor::removeParameter 메소드는 XSLT 프로세서에 설정된 파라미터 중 하나를 제거할 수 있습니다.
* 파라미터를 제거한 후에는 파라미터를 다시 설정할 수 없습니다.
* 파라미터를 제거한 후에는 XSLT 프로세서가 파라미터를 인식하지 못할 수 있습니다.
  • profile_image
    나우호스팅 @pcs8404 

    호스팅포럼 화이팅!

    댓글목록

    등록된 댓글이 없습니다.

  • 전체 8,985건 / 29 페이지

검색

게시물 검색