Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] namespace syntax

From: "Robert Van Gemert" <rcvangemert@---------.---.-->
To: <xsl-list@-----.------------.--->
Date: 8/4/2009 12:35:00 PM
Hi,

I am using msxml3 and am having difficulty parsing namespace elements, I 
need to get the value of the NSML fields

help with the namespace syntax would be appreciated.

thanks,
-rvg

My source document is:

<?xml version=3D"1.0"?>
<mos>
 <mosID>gvg.auroraplay.mos</mosID>
 <ncsID>MNEWS</ncsID>
 <roStorySend>
  <roID>MNEWS/TVNEWS.AUSNET.RUNDOWNS-IGNITE.AM-TWO</roID>
  <storyID>492893613</storyID>
  <storySlug>1130 AUSNET 030809</storySlug>
  <storyNum></storyNum>
  <mosExternalMetadata>
   <mosPayload>coding=3D"utf-16"?&gt;
    <nsml:nsml xmlns:nsml=3D"http://www.inewsroom.com">
     <nsml:head>
      <nsml:meta words=3D"1" rate=3D"180" break=3D"yes"></nsml:meta>
      <nsml:rgroup number=3D"2"></nsml:rgroup>
      <nsml:wgroup number=3D"6"></nsml:wgroup>
      <nsml:formname>TVNEWS-2            </nsml:formname>
      <nsml:storyid>1d60f5ad:003b5638:4a76334b</nsml:storyid>
     </nsml:head>
     <nsml:fields>
      <nsml:f id=3D"page-number"></nsml:f>
      <nsml:f id=3D"title">1130 AUSNET 030809</nsml:f>
      <nsml:f id=3D"var-1"></nsml:f>
      <nsml:f id=3D"presenter"></nsml:f>
      <nsml:f id=3D"var-2"></nsml:f>
      <nsml:f id=3D"var-3"></nsml:f>
      <nsml:f id=3D"status">OK</nsml:f>
      <nsml:f id=3D"runs-time" uec=3D"yes">0</nsml:f>
      <nsml:f id=3D"total-time">0</nsml:f>
      <nsml:f id=3D"cume-time" uec=3D"yes">@41400</nsml:f>
      <nsml:f id=3D"back-time"></nsml:f>
      <nsml:f id=3D"var-4">Producer: nat   Prod/Presenter: bev  Ass. =
Producers: SConway/Sawlani</nsml:f>
      <nsml:f id=3D"tme">ALINEUP,ASTOP,AINIT,ASTOP</nsml:f>
      <nsml:f id=3D"var-6">DIRECTOR: richard</nsml:f>
      <nsml:f id=3D"writer">jacklinj3h</nsml:f>
      <nsml:f id=3D"modify-by">goffinr7x</nsml:f>
      <nsml:f id=3D"modify-date">1249260363</nsml:f>
      <nsml:f id=3D"var-7"></nsml:f>
     </nsml:fields>
     <nsml:body>
      <nsml:p>xxx</nsml:p>
     </nsml:body>
    </nsml:nsml>
   </mosPayload>
  </mosExternalMetadata>
  <storyBody>
   <p>xxx</p>
  </storyBody>
 </roStorySend>
</mos>


My stylesheet is:

<?xml version=3D"1.0"?>
<xsl:stylesheet version=3D"1.0" =
xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" =
xmlns:nsml=3D"http://www.avid.com">
 <xsl:template match=3D"/">
  <xsl:for-each select=3D"//mosExternalMetadata">
   <xsl:value-of select=3D"."/>
  </xsl:for-each>
--------------
  <xsl:for-each select=3D"//mosPayload">
   <xsl:value-of select=3D"."/>
  </xsl:for-each>
--------------
  <xsl:for-each select=3D"//mosPayload/nsml:fields/f">
   <xsl:value-of select=3D"."/>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent