Remove not working bom_cvs.xsl file. Fix minor compil warnings in x3dmodelparser.cpp.

This commit is contained in:
jean-pierre charras 2016-06-01 18:42:01 +02:00
parent dc4882c4bd
commit 0a6245e5cc
2 changed files with 7 additions and 54 deletions

View File

@ -46,7 +46,9 @@
* "KI_TRACE_X3D_PARSER". See the wxWidgets documentation on wxLogTrace for
* more information.
*/
#if defined(DEBUG)
static const wxChar* traceX3DParser = wxT( "KI_TRACE_X3D_PARSER" );
#endif
X3D_MODEL_PARSER::X3D_MODEL_PARSER( S3D_MASTER* aMaster ) :
@ -98,9 +100,9 @@ bool X3D_MODEL_PARSER::Load( const wxString& aFilename )
childs.push_back( m_model );
wxXmlNode* node = *node_it;
wxXmlAttribute* prop = node->GetAttributes();
wxLogTrace( traceX3DParser, wxT( "Transform: %s %s" ), prop->GetName(), prop->GetValue() );
wxLogTrace( traceX3DParser, wxT( "Transform: %s %s" ),
node->GetAttributes()->GetName(), node->GetAttributes()->GetValue() );
readTransform( node );
@ -145,9 +147,7 @@ void X3D_MODEL_PARSER::GetNodeProperties( wxXmlNode* aNode, PROPERTY_MAP& aProps
{
wxXmlAttribute* prop;
for( prop = aNode->GetAttributes();
prop != NULL;
prop = prop->GetNext() )
for( prop = aNode->GetAttributes(); prop != NULL; prop = prop->GetNext() )
{
aProps[ prop->GetName() ] = prop->GetValue();
}
@ -163,8 +163,7 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode )
GetChildsByName( aTransformNode, wxT( "Material" ), childnodes );
for( NODE_LIST::iterator node = childnodes.begin();
node != childnodes.end();
node++ )
node != childnodes.end(); node++ )
{
readMaterial( *node );
}
@ -180,8 +179,7 @@ void X3D_MODEL_PARSER::readTransform( wxXmlNode* aTransformNode )
GetChildsByName( aTransformNode, wxT( "IndexedFaceSet" ), childnodes );
for( NODE_LIST::iterator node = childnodes.begin();
node != childnodes.end();
node++ )
node != childnodes.end(); node++ )
{
readIndexedFaceSet( *node, properties );
}

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet that takes EESCHEMA's Generic Netlist Format as input and
outputs a simple BOM in CSV format. Feel free to enhance this and submit
patches.
How to use:
Eeschema.pdf: chapter 14
-->
<!--
@package
Generate a comma separated value BOM list (csv file type).
Components are sorted by value
One component per line
Fields are
Quantity, 'Part name', Description, lib
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY nl "&#xd;&#xa;"> <!--new line CR, LF -->
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<!-- for each component -->
<xsl:template match="libpart">
<!-- -->
<xsl:value-of select="count(//comp/libsource/@part[@part])"/><xsl:text>,"</xsl:text>
<xsl:value-of select="@part"/><xsl:text>","</xsl:text>
<xsl:value-of select="description"/><xsl:text>","</xsl:text>
<xsl:value-of select="@lib"/>
<xsl:text>"&nl;</xsl:text>
</xsl:template>
<xsl:template match="/export">
<xsl:text>Qty,partname,description,lib&nl;</xsl:text>
<xsl:apply-templates select="libparts/libpart"/>
</xsl:template>
</xsl:stylesheet>