2012-06-01 1 views
0

지금 간단한 작업이 필요합니다. 내가 가진 코드 :하나의 노드를 복사하고 다른 노드를 변경하는 방법

<m:node1> 
... 
</m:node1> 
<namespace:something attribute1='1'/> 
<namespaceOther:other attribute1='2'/> 
<namespaceOther:some attribute1='1'/> 

속성 1 = 1 나는이 필요 그래서 경우 : <namespace:* attribute1 다음 복사 동일한 일을하는 경우

<m:node1> 
... 
</m:node1> 
<namespace:something attribute1='1'/> 
<namespaceOther:some attribute1='1'/> 

내가해야 할 것은 모든 아이들과 사본 <m:node1>하고 확인 그렇지 않다.

나는 <template match="*:*">과 같은 것을 원하지만 그럴 수 없습니다. 알아낼 수 없습니다.

답변

1

이 작동합니다 : 답변

<xsl:copy-of select="m:node1" /> 
<xsl:copy-of select="*[@attribute1='1']" /> 
+0

감사합니다. – TerTer